import sys

import heapq

import math

import fractions

import bisect

import itertools

from collections import Counter

from collections import deque

from operator import itemgetter

def input(): return sys.stdin.readline().strip()

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

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



h,w,k=mp()

rh=[i for i in range(h)]

rw=[i for i in range(w)]

grid=[]

for i in range(h):

    grid.append(eval(input()))

lh=[]

lw=[]

for i in range(h):

    lh.extend(list(itertools.combinations(rh, i)))

for i in range(w):

    lw.extend(list(itertools.combinations(rw, i)))







ans=0



for x in lh:

    for y in lw:







        ch=[[0]*w for i in range(h)]

        for i in range(h):

            for j in range(w):

                if i in x or j in y:

                    ch[i][j]=1

        c=0

        for i in range(h):

            for j in range(w):

                if ch[i][j]==0 and grid[i][j]=="#":

                    c+=1





        if c==k:

            ans+=1

print(ans)

import sys

import heapq

import math

import fractions

import bisect

import itertools

from collections import Counter

from collections import deque

from operator import itemgetter

def input(): return sys.stdin.readline().strip()

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

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



h,w,k=mp()

grid=[]

for i in range(h):

    grid.append(eval(input()))

ans=0

for i in range(2**h):

    for j in range(2**w):

        c=0

        for x in range(h):

            for y in range(w):

                if ((i>>x)&1) and ((j>>y)&1) and grid[x][y]=="#":

                    c+=1

        if c==k:

            ans+=1

print(ans)
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter


def input():
    return sys.stdin.readline().strip()


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


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


h, w, k = mp()
rh = [i for i in range(h)]
rw = [i for i in range(w)]
grid = []
for i in range(h):
    grid.append(eval(input()))
lh = []
lw = []
for i in range(h):
    lh.extend(list(itertools.combinations(rh, i)))
for i in range(w):
    lw.extend(list(itertools.combinations(rw, i)))
ans = 0
for x in lh:
    for y in lw:
        ch = [[0] * w for i in range(h)]
        for i in range(h):
            for j in range(w):
                if i in x or j in y:
                    ch[i][j] = 1
        c = 0
        for i in range(h):
            for j in range(w):
                if ch[i][j] == 0 and grid[i][j] == "#":
                    c += 1
        if c == k:
            ans += 1
print(ans)

import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter


def input():
    return sys.stdin.readline().strip()


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


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


h, w, k = mp()
grid = []
for i in range(h):
    grid.append(eval(input()))
ans = 0
for i in range(2**h):
    for j in range(2**w):
        c = 0
        for x in range(h):
            for y in range(w):
                if ((i >> x) & 1) and ((j >> y) & 1) and grid[x][y] == "#":
                    c += 1
        if c == k:
            ans += 1
print(ans)

-rh = [i for i in range(h)] -rw = [i for i in range(w)] -lh = [] -lw = [] -for i in range(h): -    lh.extend(list(itertools.combinations(rh, i))) -for i in range(w): -    lw.extend(list(itertools.combinations(rw, i))) -for x in lh: -    for y in lw: -        ch = [[0] * w for i in range(h)] -        for i in range(h): -            for j in range(w): -                if i in x or j in y: -                    ch[i][j] = 1 +for i in range(2**h): +    for j in range(2**w): -        for i in range(h): -            for j in range(w): -                if ch[i][j] == 0 and grid[i][j] == "#": +        for x in range(h): +            for y in range(w): +                if ((i >> x) & 1) and ((j >> y) & 1) and grid[x][y] == "#":