#!/usr/bin/env python3
import itertools as it
# import numpy as np

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    H, W, K = map(int,input().split(" "))
    S = [[int(_) for _ in input().replace("#","1").replace(".","0")] for _ in range(H)]
    # S = np.array(S)

    kw = []
    for i in range(1,W+1):
        kw += list(it.combinations(range(W),i))
    kh = []
    for i in range(1,H+1):
        kh += list(it.combinations(range(H),i))

    def slice(w,h):
        r = 0
        for w_ in w:
            for h_ in h:
                r += S[h_][w_]
        return r

    ans=0
    for iw in kw:
        for ih in kh:
            if slice(iw,ih) == K: ans+=1
                
    print(ans)
    return

if __name__ == '__main__':
    main()
