#include <bits/stdc++.h>
using namespace std;
char cubo[15][15][15];
bool marcas[15][15][15];
int xi, yi, n, m, k, cont = 0, resp = 0;
char le;
int dx[] = {0, 1, 0, -1, 0, 0}, dy[] = {-1, 0, 1, 0, 0, 0},
    dz[] = {0, 0, 0, 0, -1, 1};
void busca(int z, int y, int x) {
  if (z < 0 || y < 0 || x < 0 || z == k || y == n || x == m || marcas[z][y][x])
    return;
  resp++;
  marcas[z][y][x] = true;
  for (int i = 0; i < 6; i++) busca(z + dz[i], y + dy[i], x + dx[i]);
  return;
}
int main() {
  cin >> k >> n >> m;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < n; j++) {
      for (int l = 0; l < m; l++) {
        cin >> le;
        if (le == '#') marcas[k - 1 - i][j][l] = true;
        cubo[k - 1 - i][j][l] = le;
      }
    }
  }
  cin >> yi >> xi;
  yi--;
  xi--;
  busca(k - 1, yi, xi);
  cout << resp << "\n";
}
