import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
import string
def main():  #startline-------------------------------------------
    h, w, K = map(int, input().split())
    cmat = [input() for i in range(h)]
    ans = 0
    sublist = []
    com_sublist = [] #sublistの補集合
    #最初に黒の数を数えておく
    firstblack = 0
    for i in range(h):
        firstblack += cmat[i].count("#")
    for i in range(1 << h):
        for j in range(h):
            if (i >> j) & 1:
                sublist.append(cmat[j])
            else:
                com_sublist.append(cmat[j])
        #選ばれた横の行に対して行う操作
        lensub = len(sublist)
        lencomsub = len(com_sublist)
        elecnt = 0
        for ele in sublist:
            elecnt += ele.count("#")
        #次に選ばれてないcomの縦の行を全探索する
        #行列を転置したほうが分かりやすい
        newcomsub = []
        for j in range(w):
            newcomsub.append([com_sublist[k][j] for k in range(lencomsub)])
        #今は縦の長さがw,横の長さがlencomsub
        for j in range(w):
            if not (newcomsub[j]):
                continue
            newcomsub[j] = "".join(newcomsub[j])
        subcomsub = []
        for j in range(1 << w):
            comelecnt = 0
            for k in range(w):
                if (j >> k) & 1:
                    subcomsub.append(newcomsub[k])
            #comsubのなかから選ばれたほう(subcomb)、補集合は考えなくてよい
            for subele in subcomsub:
                comelecnt += subele.count("#")
            #これで最初の値から選ばれた値をひいたものが等しければよい
            if firstblack - (elecnt + comelecnt) == K:
                ans += 1
            subcomsub = []
        #リストの初期化
        sublist = []
        com_sublist = []

    print(ans)


if __name__ == "__main__":
    main() #endline===============================================

Measured memory_bytes: 21928