import sys

sys.setrecursionlimit(10 ** 9)

# input = sys.stdin.readline    ####

def int1(x): return int(x) - 1

def II(): return int(eval(input()))

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

def MI1(): return list(map(int1, input().split()))

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

def LI1(): return list(map(int1, input().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]

def MS(): return input().split()

def LS(): return list(eval(input()))

def LLS(rows_number): return [LS() for _ in range(rows_number)]

def printlist(lst, k=' '): print((k.join(list(map(str, lst)))))

INF = float('inf')

# from math import ceil, floor, log2

# from collections import deque

from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations

# from heapq import heapify, heappop, heappush

import numpy as np    # cumsum

# from bisect import bisect_left, bisect_right



def solve():

    H, W, K = MI()

    G = np.array([])

    for h in range(H):

        l = LS()

        for i in range(W):

            if l[i] == '#':

                l[i] = 1

            else:

                l[i] = 0

        G = np.append(G, l)

    G = G.reshape((H, W))



    ret = 0

    for x in product((0, 1), repeat=W):

        dX = G * x  # 列方向に 1 or 0 を掛ける

        for y in product((0, 1), repeat=H):

            s = (dX.T * y).sum()

            if s == K:

                ret += 1

    print(ret)





if __name__ == '__main__':

    solve()

import sys

sys.setrecursionlimit(10 ** 9)

# input = sys.stdin.readline    ####

def int1(x): return int(x) - 1

def II(): return int(eval(input()))

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

def MI1(): return list(map(int1, input().split()))

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

def LI1(): return list(map(int1, input().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]

def MS(): return input().split()

def LS(): return list(eval(input()))

def LLS(rows_number): return [LS() for _ in range(rows_number)]

def printlist(lst, k=' '): print((k.join(list(map(str, lst)))))

INF = float('inf')

# from math import ceil, floor, log2

# from collections import deque

from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations

# from heapq import heapify, heappop, heappush

import numpy as np    # cumsum

# from bisect import bisect_left, bisect_right



def solve():

    H, W, K = MI()

    G = [[0] * W for _ in range(H)]

    for i in range(H):

        line = LS()

        for j, l in enumerate(line):

            if l == '#':

                G[i][j] += 1

    # print(G)

    G = np.array(G)



    ans = 0

    for i in product([0, 1], repeat=W):

        R = G * i

        for j in product([0, 1], repeat=H):

            A = R.T * j

            # print(A, A.sum())

            if A.sum() == K:

                ans += 1

    print(ans)







if __name__ == '__main__':

    solve()

import sys

sys.setrecursionlimit(10**9)
# input = sys.stdin.readline    ####
def int1(x):
    return int(x) - 1


def II():
    return int(eval(input()))


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


def MI1():
    return list(map(int1, input().split()))


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


def LI1():
    return list(map(int1, input().split()))


def LLI(rows_number):
    return [LI() for _ in range(rows_number)]


def MS():
    return input().split()


def LS():
    return list(eval(input()))


def LLS(rows_number):
    return [LS() for _ in range(rows_number)]


def printlist(lst, k=" "):
    print((k.join(list(map(str, lst)))))


INF = float("inf")
# from math import ceil, floor, log2
# from collections import deque
from itertools import (
    combinations as comb,
    combinations_with_replacement as comb_w,
    accumulate,
    product,
    permutations,
)

# from heapq import heapify, heappop, heappush
import numpy as np  # cumsum

# from bisect import bisect_left, bisect_right
def solve():
    H, W, K = MI()
    G = np.array([])
    for h in range(H):
        l = LS()
        for i in range(W):
            if l[i] == "#":
                l[i] = 1
            else:
                l[i] = 0
        G = np.append(G, l)
    G = G.reshape((H, W))
    ret = 0
    for x in product((0, 1), repeat=W):
        dX = G * x  # 列方向に 1 or 0 を掛ける
        for y in product((0, 1), repeat=H):
            s = (dX.T * y).sum()
            if s == K:
                ret += 1
    print(ret)


if __name__ == "__main__":
    solve()

import sys

sys.setrecursionlimit(10**9)
# input = sys.stdin.readline    ####
def int1(x):
    return int(x) - 1


def II():
    return int(eval(input()))


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


def MI1():
    return list(map(int1, input().split()))


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


def LI1():
    return list(map(int1, input().split()))


def LLI(rows_number):
    return [LI() for _ in range(rows_number)]


def MS():
    return input().split()


def LS():
    return list(eval(input()))


def LLS(rows_number):
    return [LS() for _ in range(rows_number)]


def printlist(lst, k=" "):
    print((k.join(list(map(str, lst)))))


INF = float("inf")
# from math import ceil, floor, log2
# from collections import deque
from itertools import (
    combinations as comb,
    combinations_with_replacement as comb_w,
    accumulate,
    product,
    permutations,
)

# from heapq import heapify, heappop, heappush
import numpy as np  # cumsum

# from bisect import bisect_left, bisect_right
def solve():
    H, W, K = MI()
    G = [[0] * W for _ in range(H)]
    for i in range(H):
        line = LS()
        for j, l in enumerate(line):
            if l == "#":
                G[i][j] += 1
    # print(G)
    G = np.array(G)
    ans = 0
    for i in product([0, 1], repeat=W):
        R = G * i
        for j in product([0, 1], repeat=H):
            A = R.T * j
            # print(A, A.sum())
            if A.sum() == K:
                ans += 1
    print(ans)


if __name__ == "__main__":
    solve()

-    G = np.array([]) -    for h in range(H): -        l = LS() -        for i in range(W): -            if l[i] == "#": -                l[i] = 1 -            else: -                l[i] = 0 -        G = np.append(G, l) -    G = G.reshape((H, W)) -    ret = 0 -    for x in product((0, 1), repeat=W): -        dX = G * x  # 列方向に 1 or 0 を掛ける -        for y in product((0, 1), repeat=H): -            s = (dX.T * y).sum() -            if s == K: -                ret += 1 -    print(ret) +    G = [[0] * W for _ in range(H)] +    for i in range(H): +        line = LS() +        for j, l in enumerate(line): +            if l == "#": +                G[i][j] += 1 +    # print(G) +    G = np.array(G) +    ans = 0 +    for i in product([0, 1], repeat=W): +        R = G * i +        for j in product([0, 1], repeat=H): +            A = R.T * j +            # print(A, A.sum()) +            if A.sum() == K: +                ans += 1 +    print(ans)