from collections import defaultdict

import itertools



def main():

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



    B = 0

    BH = [0]*H

    BW = [0]*W

    BHW = []

    pBHW = []

    for h in range(H):

        BHW.append([0]*W)

    for i in range(H):

        C = list(eval(input()))

        for j in range(W):

            if C[j] == '#':

                B += 1

                BH[i] += 1

                BW[j] += 1

                BHW[i][j] = 1

                pBHW.append((i,j))



    cnt = 0

    for ibit in range(0,1<<H):

        for jbit in range(0,1<<W):

            icost = 0

            jcost = 0

            ijcost = 0

            for i in range(H):

                if (1<<i) & ibit:

                    icost += BH[i]

            for j in range(W):

                if (1<<j) & jbit:

                    jcost += BW[j]

            for i in range(H):

                for j in range(W):

                    if (1<<i) & ibit and (1<<j) & jbit:

                        ijcost += BHW[i][j]

            b = B - icost - jcost + ijcost

            if K == b:

                cnt += 1

            # print(b,B,icost,jcost,ijcost,cnt)

    print(cnt)

                        

    # print(B)

    # print(BH)

    # print(BW)

    # print(BHW)

    # print(pBHW)

    # for k in itertools.combinations(pBHW,2):

    #     print(k)

    # cnt = 0



    # costs_i = []

    # for ibit in range(0,1<<H):

    #     cost = 0

    #     for i in range(H):

    #         if (1<<i) & ibit:

    #             cost += BH[i]

    #     costs_i.append(cost)

    # costs_j = []

    # for jbit in range(0,1<<W):

    #     cost = 0

    #     for j in range(H):

    #         if (1<<j) & jbit:

    #             cost += BW[j]

    #     costs_j.append(cost)

    # print(costs_i)

    # print(costs_j)

    

    # for ci in costs_i:

    #     for cj in costs_j:

    #         b = B - ci - cj + BHW[i][j]

    #         if K == b:

    #             cnt += 1

    #         print(i,j,b,B,BH[i],BW[j],BHW[i][j],cnt)

    # print(cnt)



if __name__ == '__main__':

    main()
def main():

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



    B = 0

    BH = [0]*H

    BW = [0]*W

    BHW = []

    for h in range(H):

        BHW.append([0]*W)

    for i in range(H):

        C = list(eval(input()))

        for j in range(W):

            if C[j] == '#':

                B += 1

                BH[i] += 1

                BW[j] += 1

                BHW[i][j] = 1



    cnt = 0

    for ibit in range(0,1<<H):

        for jbit in range(0,1<<W):

            icost = 0

            jcost = 0

            ijcost = 0

            for i in range(H):

                if (1<<i) & ibit:

                    icost += BH[i]

            for j in range(W):

                if (1<<j) & jbit:

                    jcost += BW[j]

            for i in range(H):

                for j in range(W):

                    if (1<<i) & ibit and (1<<j) & jbit:

                        ijcost += BHW[i][j]

            b = B - icost - jcost + ijcost

            if K == b:

                cnt += 1

    print(cnt)



if __name__ == '__main__':

    main()
from collections import defaultdict
import itertools


def main():
    H, W, K = [int(x) for x in input().split()]
    B = 0
    BH = [0] * H
    BW = [0] * W
    BHW = []
    pBHW = []
    for h in range(H):
        BHW.append([0] * W)
    for i in range(H):
        C = list(eval(input()))
        for j in range(W):
            if C[j] == "#":
                B += 1
                BH[i] += 1
                BW[j] += 1
                BHW[i][j] = 1
                pBHW.append((i, j))
    cnt = 0
    for ibit in range(0, 1 << H):
        for jbit in range(0, 1 << W):
            icost = 0
            jcost = 0
            ijcost = 0
            for i in range(H):
                if (1 << i) & ibit:
                    icost += BH[i]
            for j in range(W):
                if (1 << j) & jbit:
                    jcost += BW[j]
            for i in range(H):
                for j in range(W):
                    if (1 << i) & ibit and (1 << j) & jbit:
                        ijcost += BHW[i][j]
            b = B - icost - jcost + ijcost
            if K == b:
                cnt += 1
            # print(b,B,icost,jcost,ijcost,cnt)
    print(cnt)
    # print(B)
    # print(BH)
    # print(BW)
    # print(BHW)
    # print(pBHW)
    # for k in itertools.combinations(pBHW,2):
    #     print(k)
    # cnt = 0
    # costs_i = []
    # for ibit in range(0,1<<H):
    #     cost = 0
    #     for i in range(H):
    #         if (1<<i) & ibit:
    #             cost += BH[i]
    #     costs_i.append(cost)
    # costs_j = []
    # for jbit in range(0,1<<W):
    #     cost = 0
    #     for j in range(H):
    #         if (1<<j) & jbit:
    #             cost += BW[j]
    #     costs_j.append(cost)
    # print(costs_i)
    # print(costs_j)
    # for ci in costs_i:
    #     for cj in costs_j:
    #         b = B - ci - cj + BHW[i][j]
    #         if K == b:
    #             cnt += 1
    #         print(i,j,b,B,BH[i],BW[j],BHW[i][j],cnt)
    # print(cnt)


if __name__ == "__main__":
    main()

def main():
    H, W, K = [int(x) for x in input().split()]
    B = 0
    BH = [0] * H
    BW = [0] * W
    BHW = []
    for h in range(H):
        BHW.append([0] * W)
    for i in range(H):
        C = list(eval(input()))
        for j in range(W):
            if C[j] == "#":
                B += 1
                BH[i] += 1
                BW[j] += 1
                BHW[i][j] = 1
    cnt = 0
    for ibit in range(0, 1 << H):
        for jbit in range(0, 1 << W):
            icost = 0
            jcost = 0
            ijcost = 0
            for i in range(H):
                if (1 << i) & ibit:
                    icost += BH[i]
            for j in range(W):
                if (1 << j) & jbit:
                    jcost += BW[j]
            for i in range(H):
                for j in range(W):
                    if (1 << i) & ibit and (1 << j) & jbit:
                        ijcost += BHW[i][j]
            b = B - icost - jcost + ijcost
            if K == b:
                cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

-from collections import defaultdict -import itertools - - -    pBHW = [] -                pBHW.append((i, j)) -            # print(b,B,icost,jcost,ijcost,cnt) -    # print(B) -    # print(BH) -    # print(BW) -    # print(BHW) -    # print(pBHW) -    # for k in itertools.combinations(pBHW,2): -    #     print(k) -    # cnt = 0 -    # costs_i = [] -    # for ibit in range(0,1<<H): -    #     cost = 0 -    #     for i in range(H): -    #         if (1<<i) & ibit: -    #             cost += BH[i] -    #     costs_i.append(cost) -    # costs_j = [] -    # for jbit in range(0,1<<W): -    #     cost = 0 -    #     for j in range(H): -    #         if (1<<j) & jbit: -    #             cost += BW[j] -    #     costs_j.append(cost) -    # print(costs_i) -    # print(costs_j) -    # for ci in costs_i: -    #     for cj in costs_j: -    #         b = B - ci - cj + BHW[i][j] -    #         if K == b: -    #             cnt += 1 -    #         print(i,j,b,B,BH[i],BW[j],BHW[i][j],cnt) -    # print(cnt)