#include <bits/stdc++.h>
using namespace std;
char gra[11][11][11];
int n, m, r1, c1, k, cnt = 0;
void dfs(int i, int j, int l) {
  if (i == k || j == n || l == m || i == -1 || j == -1 || l == -1 ||
      gra[i][j][l] == '#')
    return;
  gra[i][j][l] = '#';
  cnt++;
  dfs(i + 1, j, l);
  dfs(i - 1, j, l);
  dfs(i, j + 1, l);
  dfs(i, j - 1, l);
  dfs(i, j, l + 1);
  dfs(i, j, l - 1);
}
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 >> gra[i][j][l];
      }
    }
  }
  cin >> r1 >> c1;
  dfs(0, r1 - 1, c1 - 1);
  cout << cnt << endl;
}
