@staticmethod
def c():
    (r, c, k) = map(int, sys.stdin.readline().split())
    s = np.array([list(s) for s in sys.stdin.read().split()])
    s = np.pad(s, 1, constant_values='x')
    a = np.zeros_like(s, dtype=np.float64)
    a[(s == 'o')] = np.inf
    for i in range(1, (r + 1)):
        np.minimum((a[(i - 1), :] + 1), a[i, :], out=a[i, :])
    for i in range(r, 0, (- 1)):
        np.minimum((a[(i + 1), :] + 1), a[i, :], out=a[i, :])
    for j in range(1, (c + 1)):
        np.minimum((a[:, (j - 1)] + 1), a[:, j], out=a[:, j])
    for j in range(c, 0, (- 1)):
        np.minimum((a[:, (j + 1)] + 1), a[:, j], out=a[:, j])
    print(np.count_nonzero((a >= k)))
@staticmethod
def c():
    (r, c, k) = map(int, sys.stdin.readline().split())
    s = np.array([list(s) for s in sys.stdin.read().split()])
    s = np.pad(s, 1, constant_values='x')
    a = np.zeros_like(s, dtype=np.float64)
    a[(s == 'o')] = np.inf
    for i in range(1, (r + 1)):
        np.minimum((a[(i - 1), :] + 1), a[i, :], out=a[i, :])
    for i in range(r, 0, (- 1)):
        np.minimum((a[(i + 1), :] + 1), a[i, :], out=a[i, :])
    for j in range(1, (c + 1)):
        np.minimum((a[:, (j - 1)] + 1), a[:, j], out=a[:, j])
    for j in range(c, 0, (- 1)):
        np.minimum((a[:, (j + 1)] + 1), a[:, j], out=a[:, j])
    print(np.count_nonzero((a >= k)))