#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y, z;
  Point(int a, int b, int c) {
    x = a;
    y = b;
    z = c;
  }
};
queue<Point> q;
int dx[] = {0, 0, 1, -1, 0, 0}, dy[] = {1, -1, 0, 0, 0, 0},
    dz[] = {0, 0, 0, 0, 1, -1};
int main() {
  int x, y, z, rez = 1;
  cin >> z >> x >> y;
  Point size(x, y, z);
  bool mas[15][15][15];
  fill(&mas[0][0][0], &mas[0][0][0] + 15 * 15 * 15, false);
  for (int a = 0; a < z; a++)
    for (int b = 0; b < x; b++)
      for (int c = 0; c < y; c++) {
        char ch;
        cin >> ch;
        mas[b][c][a] = (ch == '#');
      }
  cin >> x >> y;
  x--;
  y--;
  mas[x][y][0] = true;
  Point start(x, y, 0);
  q.push(start);
  while (!q.empty()) {
    Point cur = q.front();
    q.pop();
    for (int i = 0; i < 6; i++) {
      if (cur.x + dx[i] >= 0 && cur.x + dx[i] < size.x && cur.y + dy[i] >= 0 &&
          cur.y + dy[i] < size.y && cur.z + dz[i] >= 0 &&
          cur.z + dz[i] < size.z &&
          !mas[cur.x + dx[i]][cur.y + dy[i]][cur.z + dz[i]]) {
        q.push(Point(cur.x + dx[i], cur.y + dy[i], cur.z + dz[i]));
        mas[cur.x + dx[i]][cur.y + dy[i]][cur.z + dz[i]] = true;
        rez++;
      }
    }
  }
  cout << rez;
  return 0;
}
