For this Question: Given a boolean Matrix of size N*M, A cell of the matrix is called "Good" if it is completely surrounded by the cells containing '1' i.e. each adjacent cell (which shares a common edge) contains '1'. Your task is to find the number of such cells.

See the below example for a better understandingFirst line of input contains two space- separated integers N and M. Next N lines of input contain M space- separated integers depicting the values of the matrix.

Constraints:-
3 <= N, M <= 500
0 <= Matrix[][] <= 1Print the number of good cells.Sample Input:-
3 3
1 1 0
1 1 1
1 1 1

Sample Output:-
1

Explanation:- 
Only cell at position 1, 1 is good

Sample Input:-
5 4
1 0 1 0
0 1 0 1
1 0 1 0
0 1 0 1
1 0 1 0

Sample Output:-
3

Explanation:-
(1, 2), (2, 1) and (3, 2) are good cells, I have written this Solution Code: N, M= list(map(int,input().split()))
mat =[]
for i in range(N):
    List =list(map(int,input().split()))[:M]
    mat.append(List)
count =0
for i in range(1,N-1):
    for j in range(1,M-1):
        if (mat[i][j-1] == 1 and mat[i][j+1] == 1 and mat[i-1][j] == 1 and mat[i+1][j] == 1):
            count +=1
print(count), In this Programming Language: Python, Now tell me if this Code is compilable or not?