func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 110;   int n, m, z;   int mapp[maxn][maxn][maxn];   bool vis[maxn][maxn][maxn];   string s;   int main() {     int ans = 0, num;     memset(vis, false, sizeof(vis));     memset(mapp, 0, sizeof(mapp));     scanf( %d%d%d , &n, &m, &z);     for (int i = 1; i <= n; i++)       for (int j = 1; j <= m; j++) {         cin >> s;         for (int k = 0; k < z; k++) {           if (s[k] ==  1 ) mapp[i][j][k + 1] = 1;         }       }     for (int i = 1; i <= n; i++)       for (int j = 1; j <= m; j++)         for (int k = 1; k <= z; k++) {           if (mapp[i][j][k]) {             if (mapp[i - 1][j][k] && mapp[i + 1][j][k] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (mapp[i][j - 1][k] && mapp[i][j + 1][k] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (mapp[i][j][k - 1] && mapp[i][j][k + 1] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (mapp[i + 1][j][k] && mapp[i][j - 1][k] &&                 !mapp[i + 1][j - 1][k] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (!mapp[i - 1][j + 1][k] && mapp[i][j + 1][k] &&                 mapp[i - 1][j][k] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (mapp[i + 1][j][k] && mapp[i][j][k - 1] &&                 !mapp[i + 1][j][k - 1] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (!mapp[i - 1][j][k + 1] && mapp[i][j][k + 1] &&                 mapp[i - 1][j][k] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (mapp[i][j + 1][k] && mapp[i][j][k - 1] &&                 !mapp[i][j + 1][k - 1] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }             if (!mapp[i][j - 1][k + 1] && mapp[i][j][k + 1] &&                 mapp[i][j - 1][k] && !vis[i][j][k]) {               ans++;               vis[i][j][k] = true;             }           }         }     printf( %d n , ans);     return 0;   }   