/*COMPETITIVE PROGRAMMING C++ TEMPLATE */

#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <cmath>
#include <iostream>
#include <stack>
#include <queue>
#include <climits>
#include <iomanip>

#define all(x) x.begin(), x.end()
#define debug(x) cout << #x << " = " << x << "\n"
#define MOD 1000000007

const long double PI = 3.141592653589793236L;

typedef long long int ll;
typedef long double ld;

using namespace std;


vector<vector<int>> combinations;

void combinationUtil(vector<int> arr, int n, int r,  
                    int index, vector<int> data, int i);  
  
// The main function that prints all 
// combinations of size r in arr[]  
// of size n. This function mainly  
// uses combinationUtil()  
void printCombination(vector<int> arr, int n, int r)  
{  
    // A temporary array to store  
    // all combination one by one  
    vector<int> data(r);  
  
    // Print all combination using  
    // temprary array 'data[]'  
    combinationUtil(arr, n, r, 0, data, 0);  
}  
  
/* arr[] ---> Input Array  
n ---> Size of input array  
r ---> Size of a combination to be printed  
index ---> Current index in data[]  
data[] ---> Temporary array to store current combination  
i ---> index of current element in arr[] */
void combinationUtil(vector<int> arr, int n, int r,  
                    int index, vector<int> data, int i)  
{  
    // Current cobination is ready, print it  
    if (index == r)  
    {  
        int I = combinations.size();
        combinations.push_back(vector<int>(r));
        for (int j = 0; j < r; j++)  
        {
            combinations[I][j] = data[j]; 
        }
        return;  
    }  
  
    // When no more elements are there to put in data[]  
    if (i >= n)  
        return;  
  
    // current is included, put next at next location  
    data[index] = arr[i];  
    combinationUtil(arr, n, r, index + 1, data, i + 1);  
  
    // current is excluded, replace it with next (Note that  
    // i+1 is passed, but index is not changed)  
    combinationUtil(arr, n, r, index, data, i+1);  
}  

void solve()
{
     int h, w, k;
     cin >> h >> w >> k;

     vector<vector<char>> a(h, vector<char>(w));
     vector<string> A(h);
    
    for(int i = 0; i < h; i++)
    {
        cin >> A[i];
    }

    for(int i = 0; i < h; i++)
    {
        for(int j = 0; j < w; j++)
        {
            a[i][j] = A[i][j];
        }
    }

    vector<int> arr_w(w);
    vector<int> arr_h(h);
    for(int i = 0; i < h; i++)
    {
        arr_h[i] = i;
    }

    for(int i = 0; i < w; i++)
    {
        arr_w[i] = i;
    }

    for(int i = 1; i <= h; i++)
    {
        printCombination(arr_h, h, i);
    }
    
    vector<vector<int>> height = combinations;

    combinations.clear();

    for(int i = 1; i <= w; i++)
    {
        printCombination(arr_w, w, i);
    }

    vector<vector<int>> width = combinations;

    combinations.clear();

    ll ans = 0;

    int count = 0;

    for(int i = 0; i < h; i++)
    {
        for(int j = 0; j < w; j++)
        {
            if(a[i][j] == '#')
                count++;
        }
    }

    if(count == k)
    {
        ans++;
    }
    
    for(int i = 0; i < height.size(); i++)
    {
        vector<vector<char>> temp = a;
        for(int x : height[i])
        {
            for(int q = 0; q < w; q++)
            {
                temp[x][q] = '.';
            }
        }

       count = 0;

        for(int q = 0; q < h; q++)
        {
            for(int y  = 0; y < w; y++)
            {
                if(temp[q][y] == '#')
                {
                    count++;
                }
            }
        }

        if(count == k)
        {
                ans++;
        }
    }

    for(int i = 0; i < width.size(); i++)
    {
         vector<vector<char>> temp = a;
        for(int x : width[i])
        {
            for(int q = 0; q < h; q++)
            {
                temp[q][x] = '.';
            }
        }

       count = 0;

        for(int q = 0; q < h; q++)
        {
            for(int y  = 0; y < w; y++)
            {
                if(temp[q][y] == '#')
                {
                    count++;
                }
            }
        }

        if(count == k)
        {
                ans++;
        }

    }

    for(int i = 0; i < height.size(); i++)
    {
        vector<int> H = height[i];
        for(int j = 0; j < width.size(); j++)
        {
            vector<int> W = width[j];
            vector<vector<char>> temp = a;

            for(int x : H)
            {
                for(int q = 0; q < w; q++)
                {
                    temp[x][q] = '.';
                }
            }

            for(int x : W)
            {
                for(int q = 0; q < h; q++)
                {
                    temp[q][x] = '.';
                }
            }

            count = 0;

            for(int q = 0; q < h; q++)
            {
                for(int y  = 0; y < w; y++)
                {
                    if(temp[q][y] == '#')
                    {
                        count++;
                    }
                }
            }

            if(count == k)
            {
                ans++;
            }
        }
    }

    cout << ans << "\n";

}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int T = 1;
    //cin >> T;
    
    while (T--)
    {
        solve();
    }
    
    return 0;
}



Measured memory_bytes: 3656