import numpy as np

h, w, k = list(map(int, input().split(' ')))
c = []
for i in range(h):
    c.append(np.array(list(list(input()))))

c = np.array(c)
ans = 0

h_comb = [[]]
for i in range(h):
    h_comb.append([i])
    for j in range(i+1, h):
        h_comb.append([i, j])
        for l in range(j+1, h):
            h_comb.append([i, j, l])
            for m in range(l+1, h):
                h_comb.append([i, j, l, m])
                for n in range(m+1, h):
                    h_comb.append([i, j, l, m, n])
                    for o in range(n+1, h):
                        h_comb.append([i, j, l, m, n, o])

w_comb = [[]]
for i in range(w):
    w_comb.append([i])
    for j in range(i+1, w):
        w_comb.append([i, j])
        for l in range(j+1, w):
            w_comb.append([i, j, l])
            for m in range(l+1, w):
                w_comb.append([i, j, l, m])
                for n in range(m+1, w):
                    w_comb.append([i, j, l, m, n])
                    for o in range(n+1, w):
                        w_comb.append([i, j, l, m, n, o])


for h_indice in h_comb:
    for w_indice in w_comb:
        a = c.copy()
        if len(h_indice) != 0:
            for i in h_indice:
                a[i, :] = 'x'
        if len(w_indice) != 0:
            for i in w_indice:
                a[:, i] = 'x'
        cnt = np.count_nonzero(a=='#')
        if cnt == k:
            ans += 1

print(ans)