# C - H and V

def main():

    H, W, K, *C = open(0).read().split()

    H, W, K, C = int(H), int(W), int(K), "".join(C)

    res = 0

    for bit in range(1 << (H + W)):

        cnt_black = sum(

            C[i * W + j] == "#" and not (bit >> i) & 1 and not (bit >> (j + H)) & 1

            for i in range(H)

            for j in range(W)

        )

        if cnt_black == K:

            res += 1

    print(res)





if __name__ == "__main__":

    main()

# C - H and V

def main():

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

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

    res = 0

    for bit in range(1 << (H + W)):

        cnt_black = sum(

            C[i][j] == "#" and not (bit >> i) & 1 and not (bit >> (j + H)) & 1

            for i in range(H)

            for j in range(W)

        )

        if cnt_black == K:

            res += 1

    print(res)





if __name__ == "__main__":

    main()

# C - H and V
def main():
    H, W, K, *C = open(0).read().split()
    H, W, K, C = int(H), int(W), int(K), "".join(C)
    res = 0
    for bit in range(1 << (H + W)):
        cnt_black = sum(
            C[i * W + j] == "#" and not (bit >> i) & 1 and not (bit >> (j + H)) & 1
            for i in range(H)
            for j in range(W)
        )
        if cnt_black == K:
            res += 1
    print(res)


if __name__ == "__main__":
    main()

# C - H and V
def main():
    H, W, K = list(map(int, input().split()))
    C = [input().rstrip() for _ in range(H)]
    res = 0
    for bit in range(1 << (H + W)):
        cnt_black = sum(
            C[i][j] == "#" and not (bit >> i) & 1 and not (bit >> (j + H)) & 1
            for i in range(H)
            for j in range(W)
        )
        if cnt_black == K:
            res += 1
    print(res)


if __name__ == "__main__":
    main()

-    H, W, K, *C = open(0).read().split() -    H, W, K, C = int(H), int(W), int(K), "".join(C) +    H, W, K = list(map(int, input().split())) +    C = [input().rstrip() for _ in range(H)] -            C[i * W + j] == "#" and not (bit >> i) & 1 and not (bit >> (j + H)) & 1 +            C[i][j] == "#" and not (bit >> i) & 1 and not (bit >> (j + H)) & 1