#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define F(i,a,b) for(int i=a;i<=b;++i)
int n,m,tot,ans;
char s[10][10];
int main()
{
	scanf("%d%d%d",&n,&m,&tot);
	F(i,0,n-1) scanf("%s",s[i]);
	int cnt=0;
	F(i,0,(1<<n)-1) F(j,0,(1<<m)-1)
	{
		cnt=0;
		F(k,0,n-1) if((1<<k)&i)
			F(l,0,m-1) if((1<<l)&j)if(s[k][l]=='#') ++cnt;
		if(cnt==tot) ++ans;
	}
	printf("%d",ans);
	return 0;
}