H, W, K = list(map(int, input().split()))

C = [eval(input()) for _ in range(H)]



ans = 0

for row in range(1 << H):

  for col in range(1 << W):

    cnt = 0

    for i in range(H):

      for j in range(W):

        if (row & (1 << i)) or (col & (1 << j)):

          continue

        if C[i][j] == '#':

          #print(i, j)

          cnt += 1

    #print("row={}, col={}, cnt={}".format(row, col, cnt))

    if cnt == K:

      ans += 1



print(ans)
import itertools



H, W, K = list(map(int, input().split()))

C = []



for i in range(H):

  c = list(eval(input()))

  C.append(c)

  

ans = 0



for h in itertools.product([0, 1], repeat = H):

  for w in itertools.product([0, 1], repeat = W):

    cnt = 0

    for i in range(H):

      for j in range(W):

        if h[i] == 0 and w[j] == 0 and C[i][j] == "#":

          cnt += 1

    if cnt == K:

      ans += 1



print(ans)
H, W, K = list(map(int, input().split()))
C = [eval(input()) for _ in range(H)]
ans = 0
for row in range(1 << H):
    for col in range(1 << W):
        cnt = 0
        for i in range(H):
            for j in range(W):
                if (row & (1 << i)) or (col & (1 << j)):
                    continue
                if C[i][j] == "#":
                    # print(i, j)
                    cnt += 1
        # print("row={}, col={}, cnt={}".format(row, col, cnt))
        if cnt == K:
            ans += 1
print(ans)

import itertools

H, W, K = list(map(int, input().split()))
C = []
for i in range(H):
    c = list(eval(input()))
    C.append(c)
ans = 0
for h in itertools.product([0, 1], repeat=H):
    for w in itertools.product([0, 1], repeat=W):
        cnt = 0
        for i in range(H):
            for j in range(W):
                if h[i] == 0 and w[j] == 0 and C[i][j] == "#":
                    cnt += 1
        if cnt == K:
            ans += 1
print(ans)

+import itertools + -C = [eval(input()) for _ in range(H)] +C = [] +for i in range(H): +    c = list(eval(input())) +    C.append(c) -for row in range(1 << H): -    for col in range(1 << W): +for h in itertools.product([0, 1], repeat=H): +    for w in itertools.product([0, 1], repeat=W): -                if (row & (1 << i)) or (col & (1 << j)): -                    continue -                if C[i][j] == "#": -                    # print(i, j) +                if h[i] == 0 and w[j] == 0 and C[i][j] == "#": -        # print("row={}, col={}, cnt={}".format(row, col, cnt))