def c_h_and_v():

    from itertools import combinations

    H, W, K = [int(i) for i in input().split()]

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



    ans = 0

    for row_num in range(H + 1):

        for rows in combinations(list(range(H)), row_num):

            for col_num in range(W + 1):

                for cols in combinations(list(range(W)), col_num):

                    tmp = 0

                    for r in range(H):

                        for c in range(W):

                            if r in rows or c in cols:

                                continue

                            if C[r][c] == '#':

                                tmp += 1

                    if tmp == K:

                        ans += 1



    return ans



print((c_h_and_v()))
def c_h_and_v():

    from itertools import product

    H, W, K = [int(i) for i in input().split()]

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



    ans = 0

    for rows in product([True, False], repeat=H):

        for cols in product([True, False], repeat=W):

            remain = 0

            for r, c in product(list(range(H)), list(range(W))):

                if rows[r] and cols[c] and C[r][c] == '#':

                    remain += 1

            if remain == K:

                ans += 1

    return ans



print((c_h_and_v()))
def c_h_and_v():
    from itertools import combinations

    H, W, K = [int(i) for i in input().split()]
    C = [eval(input()) for _ in range(H)]
    ans = 0
    for row_num in range(H + 1):
        for rows in combinations(list(range(H)), row_num):
            for col_num in range(W + 1):
                for cols in combinations(list(range(W)), col_num):
                    tmp = 0
                    for r in range(H):
                        for c in range(W):
                            if r in rows or c in cols:
                                continue
                            if C[r][c] == "#":
                                tmp += 1
                    if tmp == K:
                        ans += 1
    return ans


print((c_h_and_v()))

def c_h_and_v():
    from itertools import product

    H, W, K = [int(i) for i in input().split()]
    C = [eval(input()) for _ in range(H)]
    ans = 0
    for rows in product([True, False], repeat=H):
        for cols in product([True, False], repeat=W):
            remain = 0
            for r, c in product(list(range(H)), list(range(W))):
                if rows[r] and cols[c] and C[r][c] == "#":
                    remain += 1
            if remain == K:
                ans += 1
    return ans


print((c_h_and_v()))

-    from itertools import combinations +    from itertools import product -    for row_num in range(H + 1): -        for rows in combinations(list(range(H)), row_num): -            for col_num in range(W + 1): -                for cols in combinations(list(range(W)), col_num): -                    tmp = 0 -                    for r in range(H): -                        for c in range(W): -                            if r in rows or c in cols: -                                continue -                            if C[r][c] == "#": -                                tmp += 1 -                    if tmp == K: -                        ans += 1 +    for rows in product([True, False], repeat=H): +        for cols in product([True, False], repeat=W): +            remain = 0 +            for r, c in product(list(range(H)), list(range(W))): +                if rows[r] and cols[c] and C[r][c] == "#": +                    remain += 1 +            if remain == K: +                ans += 1