#include <bits/stdc++.h>
using namespace std;
const long long SIZE = 15, dx[6] = {1, -1, 0, 0, 0, 0},
                dy[6] = {0, 0, 1, -1, 0, 0}, dz[6] = {0, 0, 0, 0, 1, -1};
long long n, m, k, cnt;
char g[SIZE][SIZE][SIZE];
bool was[SIZE][SIZE][SIZE];
bool check(long long z, long long x, long long y) {
  return x >= 1 and y >= 1 and z >= 1 and x <= n and y <= m and z <= k and
         !was[z][x][y] and g[z][x][y] != '#';
}
void dfs(long long z, long long x, long long y) {
  cnt++;
  was[z][x][y] = true;
  for (long long i = 0; i < 6; ++i) {
    if (check(z + dz[i], x + dx[i], y + dy[i])) {
      dfs(z + dz[i], x + dx[i], y + dy[i]);
    }
  }
}
void solve() {
  cin >> k >> n >> m;
  for (long long i = 1; i <= k; ++i) {
    for (long long j = 1; j <= n; ++j) {
      for (long long l = 1; l <= m; ++l) {
        cin >> g[i][j][l];
      }
    }
  }
  long long x, y;
  cin >> x >> y;
  dfs(1, x, y);
  cout << cnt;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  long long size = 1;
  while (size--) {
    solve();
  }
  return 0;
}
