# import sys

# input = sys.stdin.readline

# import re

import math

import itertools



def main():

    h, w, k = input_list()

    maze = []

    for H in range(h):

        maze.append(list(eval(input())))



    ans = []

    a = 0

    all = 0

    for l in maze:

        a += l.count('#')

        all += l.count('#')

    ans.append(a)

    hash_list_H = []

    kumi = 0

    for H in range(h):

        if maze[H].count('#') == k:

            kumi += 1

        # hash_list_H.append(maze[H].count('#'))



    hash_list_W = []

    for W in range(w):

        a = 0

        for H in range(h):

            if maze[H][W] == '#':

                a += 1

        if a == k:

            kumi += 1

        hash_list_W.append(a)

    # kumi = hash_list_W.count(k) + hash_list_H.count(k)

    # if all == k:

    #     kumi += 1

    # for H in range(1, h+1):

    #     for c in itertools.combinations(hash_list_H, H):

    #         if all - sum(list(c)) == k:

    #             kumi += 1

    # for W in range(1, w+1):

    #     for c in itertools.combinations(hash_list_W, W):

    #         if all - sum(list(c)) == k:

    #             kumi += 1

    # print(kumi)

    ss = 0

    # for H in range(1, h+1):

    #     for W in range(1, w+1):

    #         for hc in itertools.combinations(hash_list_H, H):

    #             for wc in itertools.combinations(hash_list_W, W):

    #                 if all - (sum(hc) + sum(wc)) == k:

    #                     ss += 1

    # print(kumi+ss)

    r = 0

    done = []

    for H in range(h+1):

        for W in range(w+1):

            for hc in itertools.combinations(list(range(h)), H):

                for wc in itertools.combinations(list(range(w)), W):

                    if (hc, wc) in done:

                        continue

                    done.append((hc, wc))

                    if count(maze, hc, wc) == k:

                        r += 1

    print(r)



def combinations_count(n, r):

    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



def count(mazes, hc, wc):

    hc = list(hc)

    wc = list(wc)

    r = 0

    for hi, row in enumerate(mazes):

        if hi in hc:

            continue

        for wi, m in enumerate(row):

            if wi in wc:

                continue

            if m == '#':

                r += 1

    return r



def input_list():

    return list(map(int, input().split()))



def input_list_str():

    return list(map(str, input().split()))



if __name__ == '__main__':

    main()



# import sys

# input = sys.stdin.readline

import itertools

import collections

from decimal import Decimal

from functools import reduce





# 持っているビスケットを叩き、1枚増やす

# ビスケット A枚を 1円に交換する

# 1円をビスケット B枚に交換する

def main():

    H, W, k = input_list()

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

    ans = 0

    for row_bit in itertools.product(list(range(2)), repeat=H):

        for col_bit in itertools.product(list(range(2)), repeat=W):

            cnt = 0

            for row in range(H):

                for col in range(W):

                    if maze[row][col] == "#" and (row_bit[row] and col_bit[col]):

                        cnt += 1

            if cnt == k:

                ans += 1

    print(ans)





def prime_factorize(n):

    a = []

    while n % 2 == 0:

        a.append(2)

        n //= 2

    f = 3

    while f * f <= n:

        if n % f == 0:

            a.append(f)

            n //= f

        else:

            f += 2

    if n != 1:

        a.append(n)

    return a





def bfs(H, W, black_cells, dist):

    d = 0

    while black_cells:

        h, w = black_cells.popleft()

        d = dist[h][w]

        for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):

            new_h = h + dy

            new_w = w + dx

            if new_h < 0 or H <= new_h or new_w < 0 or W <= new_w:

                continue

            if dist[new_h][new_w] == -1:

                dist[new_h][new_w] = d + 1

                black_cells.append((new_h, new_w))

    return d





def input_list():

    return list(map(int, input().split()))





def input_list_str():

    return list(map(str, input().split()))





if __name__ == "__main__":

    main()

# import sys
# input = sys.stdin.readline
# import re
import math
import itertools


def main():
    h, w, k = input_list()
    maze = []
    for H in range(h):
        maze.append(list(eval(input())))
    ans = []
    a = 0
    all = 0
    for l in maze:
        a += l.count("#")
        all += l.count("#")
    ans.append(a)
    hash_list_H = []
    kumi = 0
    for H in range(h):
        if maze[H].count("#") == k:
            kumi += 1
        # hash_list_H.append(maze[H].count('#'))
    hash_list_W = []
    for W in range(w):
        a = 0
        for H in range(h):
            if maze[H][W] == "#":
                a += 1
        if a == k:
            kumi += 1
        hash_list_W.append(a)
    # kumi = hash_list_W.count(k) + hash_list_H.count(k)
    # if all == k:
    #     kumi += 1
    # for H in range(1, h+1):
    #     for c in itertools.combinations(hash_list_H, H):
    #         if all - sum(list(c)) == k:
    #             kumi += 1
    # for W in range(1, w+1):
    #     for c in itertools.combinations(hash_list_W, W):
    #         if all - sum(list(c)) == k:
    #             kumi += 1
    # print(kumi)
    ss = 0
    # for H in range(1, h+1):
    #     for W in range(1, w+1):
    #         for hc in itertools.combinations(hash_list_H, H):
    #             for wc in itertools.combinations(hash_list_W, W):
    #                 if all - (sum(hc) + sum(wc)) == k:
    #                     ss += 1
    # print(kumi+ss)
    r = 0
    done = []
    for H in range(h + 1):
        for W in range(w + 1):
            for hc in itertools.combinations(list(range(h)), H):
                for wc in itertools.combinations(list(range(w)), W):
                    if (hc, wc) in done:
                        continue
                    done.append((hc, wc))
                    if count(maze, hc, wc) == k:
                        r += 1
    print(r)


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def count(mazes, hc, wc):
    hc = list(hc)
    wc = list(wc)
    r = 0
    for hi, row in enumerate(mazes):
        if hi in hc:
            continue
        for wi, m in enumerate(row):
            if wi in wc:
                continue
            if m == "#":
                r += 1
    return r


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


def input_list_str():
    return list(map(str, input().split()))


if __name__ == "__main__":
    main()

# import sys
# input = sys.stdin.readline
import itertools
import collections
from decimal import Decimal
from functools import reduce

# 持っているビスケットを叩き、1枚増やす
# ビスケット A枚を 1円に交換する
# 1円をビスケット B枚に交換する
def main():
    H, W, k = input_list()
    maze = [list(eval(input())) for _ in range(H)]
    ans = 0
    for row_bit in itertools.product(list(range(2)), repeat=H):
        for col_bit in itertools.product(list(range(2)), repeat=W):
            cnt = 0
            for row in range(H):
                for col in range(W):
                    if maze[row][col] == "#" and (row_bit[row] and col_bit[col]):
                        cnt += 1
            if cnt == k:
                ans += 1
    print(ans)


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


def bfs(H, W, black_cells, dist):
    d = 0
    while black_cells:
        h, w = black_cells.popleft()
        d = dist[h][w]
        for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):
            new_h = h + dy
            new_w = w + dx
            if new_h < 0 or H <= new_h or new_w < 0 or W <= new_w:
                continue
            if dist[new_h][new_w] == -1:
                dist[new_h][new_w] = d + 1
                black_cells.append((new_h, new_w))
    return d


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


def input_list_str():
    return list(map(str, input().split()))


if __name__ == "__main__":
    main()

-# import re -import math +import collections +from decimal import Decimal +from functools import reduce + +# 持っているビスケットを叩き、1枚増やす +# ビスケット A枚を 1円に交換する +# 1円をビスケット B枚に交換する +def main(): +    H, W, k = input_list() +    maze = [list(eval(input())) for _ in range(H)] +    ans = 0 +    for row_bit in itertools.product(list(range(2)), repeat=H): +        for col_bit in itertools.product(list(range(2)), repeat=W): +            cnt = 0 +            for row in range(H): +                for col in range(W): +                    if maze[row][col] == "#" and (row_bit[row] and col_bit[col]): +                        cnt += 1 +            if cnt == k: +                ans += 1 +    print(ans) -def main(): -    h, w, k = input_list() -    maze = [] -    for H in range(h): -        maze.append(list(eval(input()))) -    ans = [] -    a = 0 -    all = 0 -    for l in maze: -        a += l.count("#") -        all += l.count("#") -    ans.append(a) -    hash_list_H = [] -    kumi = 0 -    for H in range(h): -        if maze[H].count("#") == k: -            kumi += 1 -        # hash_list_H.append(maze[H].count('#')) -    hash_list_W = [] -    for W in range(w): -        a = 0 -        for H in range(h): -            if maze[H][W] == "#": -                a += 1 -        if a == k: -            kumi += 1 -        hash_list_W.append(a) -    # kumi = hash_list_W.count(k) + hash_list_H.count(k) -    # if all == k: -    #     kumi += 1 -    # for H in range(1, h+1): -    #     for c in itertools.combinations(hash_list_H, H): -    #         if all - sum(list(c)) == k: -    #             kumi += 1 -    # for W in range(1, w+1): -    #     for c in itertools.combinations(hash_list_W, W): -    #         if all - sum(list(c)) == k: -    #             kumi += 1 -    # print(kumi) -    ss = 0 -    # for H in range(1, h+1): -    #     for W in range(1, w+1): -    #         for hc in itertools.combinations(hash_list_H, H): -    #             for wc in itertools.combinations(hash_list_W, W): -    #                 if all - (sum(hc) + sum(wc)) == k: -    #                     ss += 1 -    # print(kumi+ss) -    r = 0 -    done = [] -    for H in range(h + 1): -        for W in range(w + 1): -            for hc in itertools.combinations(list(range(h)), H): -                for wc in itertools.combinations(list(range(w)), W): -                    if (hc, wc) in done: -                        continue -                    done.append((hc, wc)) -                    if count(maze, hc, wc) == k: -                        r += 1 -    print(r) +def prime_factorize(n): +    a = [] +    while n % 2 == 0: +        a.append(2) +        n //= 2 +    f = 3 +    while f * f <= n: +        if n % f == 0: +            a.append(f) +            n //= f +        else: +            f += 2 +    if n != 1: +        a.append(n) +    return a -def combinations_count(n, r): -    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) - - -def count(mazes, hc, wc): -    hc = list(hc) -    wc = list(wc) -    r = 0 -    for hi, row in enumerate(mazes): -        if hi in hc: -            continue -        for wi, m in enumerate(row): -            if wi in wc: +def bfs(H, W, black_cells, dist): +    d = 0 +    while black_cells: +        h, w = black_cells.popleft() +        d = dist[h][w] +        for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)): +            new_h = h + dy +            new_w = w + dx +            if new_h < 0 or H <= new_h or new_w < 0 or W <= new_w: -            if m == "#": -                r += 1 -    return r +            if dist[new_h][new_w] == -1: +                dist[new_h][new_w] = d + 1 +                black_cells.append((new_h, new_w)) +    return d