H,W,K=map(int,input().split())
c=[list(input()) for i in range(H)]
b=0
for i in range(H):
  b+=c[i].count('#')
if b==K:
  print(1)
  exit()
  
else:
  a=K-b
  count=0
  hc=[]
  wc=[]
  for i in range(2 ** H):
    h=['0']*H 
    for j in range(H):
        if ((i >> j) & 1):
            h[H- 1 - j] = '1'
    hc.append(h)
  for i in range(2 ** W):
    w=['0']*W
    for j in range(W):
        if ((i >> j) & 1):
            w[W- 1 - j] = '1'
    wc.append(w)
  
  for k in range(len(hc)):
    for l in range(len(wc)):
      c1=list(c)
      for m in range(H):
        if hc[k][m]=='0':
          c1[m]='.'
        for n in range(W):
          if wc[l][n]=='0' and c1[m][n]=='#':
                c1[m][n]=c1[m][n].replace('#','.')
      for i in range(H):
        b+=c1[i].count('#')
        print(c1)
      if b==a:
        count+=1
        
print(count)
    
            
  