#include <bits/stdc++.h>
using namespace std;
int p, n, m, x, y, res = 1, plates[12][12][12];
int solve(int a, int b, int c) {
  if (plates[a][b][c] != -2) {
    if (plates[a - 1][b][c] == 1) {
      res++;
      plates[a - 1][b][c] = -1;
    }
    if (plates[a + 1][b][c] == 1) {
      res++;
      plates[a + 1][b][c] = -1;
    }
    if (plates[a][b - 1][c] == 1) {
      res++;
      plates[a][b - 1][c] = -1;
    }
    if (plates[a][b + 1][c] == 1) {
      res++;
      plates[a][b + 1][c] = -1;
    }
    if (plates[a][b][c - 1] == 1) {
      res++;
      plates[a][b][c - 1] = -1;
    }
    if (plates[a][b][c + 1] == 1) {
      res++;
      plates[a][b][c + 1] = -1;
    }
    plates[a][b][c] = -2;
    if (plates[a - 1][b][c] == -1) solve(a - 1, b, c);
    if (plates[a + 1][b][c] == -1) solve(a + 1, b, c);
    if (plates[a][b - 1][c] == -1) solve(a, b - 1, c);
    if (plates[a][b + 1][c] == -1) solve(a, b + 1, c);
    if (plates[a][b][c - 1] == -1) solve(a, b, c - 1);
    if (plates[a][b][c + 1] == -1) solve(a, b, c + 1);
    return res;
  }
}
int main(void) {
  char ch;
  cin >> p >> n >> m;
  for (int i = 1; i <= p; i++)
    for (int j = 1; j <= n; j++)
      for (int k = 1; k <= m; k++) {
        cin >> ch;
        (ch == '.') ? plates[i][j][k] = 1 : plates[i][j][k] = 0;
      }
  cin >> x >> y;
  cout << solve(1, x, y) << endl;
  return 0;
}
