#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
using namespace std;
int x, y, z, n, m;
string s[15][15];
int vis[15][15][15];
int dx[7] = {0, 1, 0, 0, -1, 0, 0}, dy[7] = {0, 0, 1, 0, 0, -1, 0},
    dz[7] = {0, 0, 0, 1, 0, 0, -1};
long long ans;
int prime(int x) {
  if (x == 1) return 0;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int check(int a, int b, int c) {
  if (a > x || a < 1 || b > y || b < 1 || c > z || c < 1 ||
      s[a][b][c - 1] == '#')
    return 0;
  return 1;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
void dfs(int x, int y, int z) {
  vis[x][y][z] = 1;
  for (int i = 1; i <= 6; i++) {
    int nx = x + dx[i], ny = y + dy[i], nz = z + dz[i];
    if (check(nx, ny, nz) && !vis[nx][ny][nz]) dfs(nx, ny, nz);
  }
}
int main() {
  cin >> x >> y >> z;
  for (int i = 1; i <= x; i++)
    for (int j = 1; j <= y; j++) cin >> s[i][j];
  cin >> n >> m;
  dfs(1, n, m);
  for (int i = 1; i <= x; i++)
    for (int j = 1; j <= y; j++)
      for (int k = 1; k <= z; k++) ans += vis[i][j][k];
  cout << ans;
  return 0;
}
