#include <bits/stdc++.h>
using namespace std;
const int N = 15;
int k, n, m, x, y, ans;
int dz[6] = {0, 0, 0, 0, 1, -1};
int dx[6] = {0, 0, 1, -1, 0, 0};
int dy[6] = {1, -1, 0, 0, 0, 0};
char plt[N][N][N];
bool mark[N][N][N];
bool isval(int a, int b, int c) {
  if (a < k && a >= 0 && b < n && b >= 0 && c < m && c >= 0 &&
      plt[a][b][c] == '.') {
    return true;
  }
  return false;
}
void dfs(int a, int b, int c) {
  mark[a][b][c] = true;
  ans++;
  for (int i = 0; i < 6; i++) {
    if (isval(a + dz[i], b + dx[i], c + dy[i]) &&
        !mark[a + dz[i]][b + dx[i]][c + dy[i]]) {
      dfs(a + dz[i], b + dx[i], c + dy[i]);
    }
  }
  return;
}
int main() {
  cin >> k >> n >> m;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < n; j++) {
      for (int l = 0; l < m; l++) {
        cin >> plt[i][j][l];
      }
    }
  }
  cin >> x >> y;
  x--;
  y--;
  dfs(0, x, y);
  cout << ans << endl;
  return 0;
}
