#include <bits/stdc++.h>
char rec[15][15][15];
int k, n, m, sum;
void dfs(int x, int y, int z) {
  if (x < 0 || x >= k || y < 0 || y >= n || z < 0 || z >= m ||
      rec[x][y][z] != '.')
    return;
  sum++;
  rec[x][y][z] = 0;
  dfs(x + 1, y, z);
  dfs(x - 1, y, z);
  dfs(x, y + 1, z);
  dfs(x, y - 1, z);
  dfs(x, y, z + 1);
  dfs(x, y, z - 1);
}
int main() {
  int i, j, x, y;
  while (scanf("%d%d%d", &k, &n, &m) != EOF) {
    memset(rec, 0, sizeof(rec));
    for (i = 0; i < k; i++)
      for (j = 0; j < n; j++) scanf("%s", rec[i][j]);
    scanf("%d%d", &x, &y);
    sum = 0;
    dfs(0, x - 1, y - 1);
    printf("%d\n", sum);
  }
  return 0;
}
