#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 15;
char g[N][N][N];
int n, m, k;
int dx[] = {1, 0, 0, -1, 0, 0};
int dy[] = {0, 1, 0, 0, -1, 0};
int dz[] = {0, 0, 1, 0, 0, -1};
int dfs(int x, int y, int z)
{
g[x][y][z] = '#';
int res = 1;
for(int i = 0; i < 6; i ++)
{
int x1 = x + dx[i], y1 = y + dy[i], z1 = z + dz[i];
if(x1 < 0 || x1 >= n || y1 < 0 || y1 >= m || z1 < 0 || z1 >= k) continue;
if (g[x1][y1][z1] == '#') continue;
res += dfs(x1, y1, z1);
}
return res;
}
int main()
{
cin >> n >> m >> k;
for (int i = 0; i < n; i ++ )
for (int j = 0; j < m; j ++ )
cin >> g[i][j];
int y, z;
cin >> y >> z;
cout << dfs(0, y - 1, z - 1) << endl;
return 0;
}