def MI(): return list(map(int, input().split()))

H,W,K=MI()

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

ans=0

for gyou in range(1<<H):

  for retsu in range(1<<W):

    count=0

    for i in range(H):

      for j in range(W):

        if (gyou>>i)&1 and (retsu>>j)&1:

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

            count+=1

    if count==K:

      ans+=1

print(ans)
import itertools

def MI(): return list(map(int, input().split()))

H,W,K=MI()

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

ans=0

for gyou in range(1<<H):

  for retsu in range(1<<W):

    count=0

    for i in range(H):

      if (gyou>>i)&1:

        for j in range(W):

          if (retsu>>j)&1:

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

              count+=1

    if count==K:

      ans+=1

print(ans)
def MI():
    return list(map(int, input().split()))


H, W, K = MI()
Map = [eval(input()) for _ in range(H)]
ans = 0
for gyou in range(1 << H):
    for retsu in range(1 << W):
        count = 0
        for i in range(H):
            for j in range(W):
                if (gyou >> i) & 1 and (retsu >> j) & 1:
                    if Map[i][j] == "#":
                        count += 1
        if count == K:
            ans += 1
print(ans)

import itertools


def MI():
    return list(map(int, input().split()))


H, W, K = MI()
Map = [eval(input()) for _ in range(H)]
ans = 0
for gyou in range(1 << H):
    for retsu in range(1 << W):
        count = 0
        for i in range(H):
            if (gyou >> i) & 1:
                for j in range(W):
                    if (retsu >> j) & 1:
                        if Map[i][j] == "#":
                            count += 1
        if count == K:
            ans += 1
print(ans)

+import itertools + + -            for j in range(W): -                if (gyou >> i) & 1 and (retsu >> j) & 1: -                    if Map[i][j] == "#": -                        count += 1 +            if (gyou >> i) & 1: +                for j in range(W): +                    if (retsu >> j) & 1: +                        if Map[i][j] == "#": +                            count += 1