#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
struct state {
  int x, y, z;
  state() {}
  state(int x, int y, int z) : x(x), y(y), z(z) {}
};
int d[20][20][20];
int xabs(int a) { return a < 0 ? -a : +a; }
int main() {
  int k, n, m;
  cin >> k >> n >> m;
  vector<vector<string> > a(k);
  for (int i = 0; i < k; ++i) {
    a[i] = vector<string>(n);
    for (int j = 0; j < n; ++j) cin >> a[i][j];
  }
  queue<state> q;
  memset(d, 0, sizeof d);
  int x, y;
  cin >> x >> y;
  x--;
  y--;
  d[0][x][y] = true;
  q.push(state(0, x, y));
  while (q.size()) {
    state cur = q.front();
    q.pop();
    for (int dx = -1; dx <= 1; ++dx)
      for (int dy = -1; dy <= 1; ++dy)
        for (int dz = -1; dz <= 1; ++dz)
          if (xabs(dx) + xabs(dy) + xabs(dz) == 1) {
            int nx = dx + cur.x;
            int ny = dy + cur.y;
            int nz = dz + cur.z;
            if (nx < 0 || ny < 0 || nz < 0 || nx >= k || ny >= n || nz >= m)
              continue;
            if (a[nx][ny][nz] == '#') continue;
            if (!d[nx][ny][nz]) {
              d[nx][ny][nz] = true;
              q.push(state(nx, ny, nz));
            }
          }
  }
  int cnt = 0;
  for (int i = 0; i < k; ++i)
    for (int j = 0; j < n; ++j)
      for (int z = 0; z < m; ++z) cnt += d[i][j][z];
  cout << cnt << endl;
  return 0;
}
