#include <bits/stdc++.h>
using namespace std;
char data[30][30][30];
bool visited[30][30][30];
int Count;
void dfs(int i, int j, int k) {
  if (data[i][j][k] == '.') {
    if (visited[i][j][k]) return;
    visited[i][j][k] = true;
    Count++;
    dfs(i + 1, j, k);
    dfs(i - 1, j, k);
    dfs(i, j + 1, k);
    dfs(i, j - 1, k);
    dfs(i, j, k + 1);
    dfs(i, j, k - 1);
  }
}
int main() {
  int k, n, m;
  while (cin >> k >> n >> m) {
    memset(data, 0, sizeof(data));
    Count = 0;
    for (int i = 1; i <= k; i++) {
      for (int j = 1; j <= n; j++)
        for (int k = 1; k <= m; k++) {
          cin >> data[i][j][k];
          visited[i][j][k] = false;
        }
    }
    int x, y;
    cin >> x >> y;
    dfs(1, x, y);
    cout << Count << endl;
  }
  return 0;
}
