#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 20;
char tab[MAX_N][MAX_N][MAX_N];
int k, n, m, a, b, c;
void dfs(int x, int y, int z) {
  if (tab[x][y][z] == '#' || x < 0 || x >= k || y < 0 || y >= n || z < 0 ||
      z >= m)
    return;
  c++, tab[x][y][z] = '#';
  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);
  return;
}
int main() {
  cin >> k >> n >> m;
  for (int i = 0; i < k; ++i)
    for (int j = 0; j < n; ++j) cin >> tab[i][j];
  cin >> a >> b;
  dfs(0, a - 1, b - 1);
  cout << c;
}
