#include <bits/stdc++.h>
using namespace std;
int i, j, k, l, n, m, x, y, s, ans, h, t, a, b, c, aa, bb, cc;
char p[101][101][101];
int f[100000][4];
int a1[6] = {1, -1, 0, 0, 0, 0};
int a2[6] = {0, 0, 1, -1, 0, 0};
int a3[6] = {0, 0, 0, 0, 1, -1};
int main() {
  ans = 1;
  cin >> k >> n >> m;
  for (l = 1; l <= k; l++)
    for (i = 1; i <= n; i++)
      for (j = 1; j <= m; j++) cin >> p[l][i][j];
  cin >> x >> y;
  h = 0;
  t = 1;
  f[1][1] = 1;
  f[1][2] = x;
  f[1][3] = y;
  p[1][x][y] = '#';
  while (h < t) {
    h++;
    a = f[h][1];
    b = f[h][2];
    c = f[h][3];
    for (i = 0; i < 6; i++) {
      aa = a + a1[i];
      bb = b + a2[i];
      cc = c + a3[i];
      if (aa >= 1 && aa <= k)
        if (bb >= 1 && bb <= n)
          if (cc >= 1 && cc <= m)
            if (p[aa][bb][cc] != '#') {
              t++;
              ans++;
              f[t][1] = aa;
              f[t][2] = bb;
              f[t][3] = cc;
              p[aa][bb][cc] = '#';
            }
    }
  }
  printf("%d", ans);
  return 0;
}
