def resolve():

    import numpy as np

    import sys



    readline = sys.stdin.readline    # 1行だけ文字列にする



    H, W, K = list(map(int, readline().split()))

    c = [list(readline().strip()) for _ in [0] * H]



    # matrixは文字列#とそれ以外でなる時，#を1に，それ以外を0にする

    c = np.array([[1 if c[i][j] == "#" else 0

                 for j in range(W)]

                 for i in range(H)], dtype=np.int64)



    ans = 0

    

    for bit_i in range(1 << H):

        lst_y = []

        for i in range(H):

            if bit_i & (1 << i):

                lst_y.append(i)

        for bit_j in range(1 << W):

            lst_x = []

            for j in range(W):

                if bit_j & (1 << j):

                    lst_x.append(j)

            fig = c[:]

            fig = np.delete(fig, lst_y, axis=0)

            fig = np.delete(fig, lst_x, axis=1)

            if np.count_nonzero(fig == 1) == K:

                ans += 1

    print(ans)



if __name__ == "__main__":

    resolve()

import sys





def resolve():

    """

    全パターンは2**12=4096通りだからbit全探索

    消さない行列だけ判定するコードの方がスマート？(解説動画より)

    """



    readline = sys.stdin.readline    # 1行だけ文字列にする



    H, W, K = list(map(int, readline().split()))

    c = [list(readline().strip()) for _ in [0] * H]

    ans = 0



    # bit全探索

    for bit_i in range(1 << H):

        for bit_j in range(1 << W):

            cnt = 0

            for i in range(H):

                for j in range(W):

                    if (1

                            and bit_i & (1 << i)

                            and bit_j & (1 << j)

                            and c[i][j] == '#'):

                        cnt += 1

            if cnt == K:

                ans += 1

    print(ans)





resolve()
def resolve():
    import numpy as np
    import sys

    readline = sys.stdin.readline  # 1行だけ文字列にする
    H, W, K = list(map(int, readline().split()))
    c = [list(readline().strip()) for _ in [0] * H]
    # matrixは文字列#とそれ以外でなる時，#を1に，それ以外を0にする
    c = np.array(
        [[1 if c[i][j] == "#" else 0 for j in range(W)] for i in range(H)],
        dtype=np.int64,
    )
    ans = 0
    for bit_i in range(1 << H):
        lst_y = []
        for i in range(H):
            if bit_i & (1 << i):
                lst_y.append(i)
        for bit_j in range(1 << W):
            lst_x = []
            for j in range(W):
                if bit_j & (1 << j):
                    lst_x.append(j)
            fig = c[:]
            fig = np.delete(fig, lst_y, axis=0)
            fig = np.delete(fig, lst_x, axis=1)
            if np.count_nonzero(fig == 1) == K:
                ans += 1
    print(ans)


if __name__ == "__main__":
    resolve()

import sys


def resolve():
    """
    全パターンは2**12=4096通りだからbit全探索
    消さない行列だけ判定するコードの方がスマート？(解説動画より)
    """
    readline = sys.stdin.readline  # 1行だけ文字列にする
    H, W, K = list(map(int, readline().split()))
    c = [list(readline().strip()) for _ in [0] * H]
    ans = 0
    # bit全探索
    for bit_i in range(1 << H):
        for bit_j in range(1 << W):
            cnt = 0
            for i in range(H):
                for j in range(W):
                    if 1 and bit_i & (1 << i) and bit_j & (1 << j) and c[i][j] == "#":
                        cnt += 1
            if cnt == K:
                ans += 1
    print(ans)


resolve()

+import sys + + -    import numpy as np -    import sys - +    """ +    全パターンは2**12=4096通りだからbit全探索 +    消さない行列だけ判定するコードの方がスマート？(解説動画より) +    """ -    # matrixは文字列#とそれ以外でなる時，#を1に，それ以外を0にする -    c = np.array( -        [[1 if c[i][j] == "#" else 0 for j in range(W)] for i in range(H)], -        dtype=np.int64, -    ) +    # bit全探索 -        lst_y = [] -        for i in range(H): -            if bit_i & (1 << i): -                lst_y.append(i) -            lst_x = [] -            for j in range(W): -                if bit_j & (1 << j): -                    lst_x.append(j) -            fig = c[:] -            fig = np.delete(fig, lst_y, axis=0) -            fig = np.delete(fig, lst_x, axis=1) -            if np.count_nonzero(fig == 1) == K: +            cnt = 0 +            for i in range(H): +                for j in range(W): +                    if 1 and bit_i & (1 << i) and bit_j & (1 << j) and c[i][j] == "#": +                        cnt += 1 +            if cnt == K: -if __name__ == "__main__": -    resolve() +resolve()