#include <map>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

typedef long long int ll;

template <typename T> bool next_combination(const T first, const T last, int k) {
    const T subset = first + k;
    if (first == last || first == subset || last == subset) {
        return false;
    }
    T src = subset;
    while (first != src) {
        src--;
        if (*src < *(last - 1)) {
            T dest = subset;
            while (*src >= *dest) {
                dest++;
            }
            iter_swap(src, dest);
            rotate(src + 1, dest + 1, last);
            rotate(subset, subset + (last - dest) - 1, last);
            return true;
        }
    }
    rotate(first, subset, last);
    return false;
}

vector<string> fillf(vector<int> ys, vector<int> xs, vector<string> f) {
    int y = (int)f.size();
    int x = (int)f[0].size();
    for (int yidx = 0; yidx < (int)ys.size(); yidx++) {
        int target_y = ys[yidx];
        for (int i = 0; i < x; i++) {
            f[target_y][i] = 'r';
        }
    }
    for (int xidx = 0; xidx < (int)xs.size(); xidx++) {
        int target_x = xs[xidx];
        for (int i = 0; i < y; i++) {
            f[i][target_x] = 'r';
        }
    }
    return f;
}
int cntf(vector<string> f) {
    int y = (int)f.size();
    int x = (int)f[0].size();
    int ret = 0;
    for (int i = 0; i < y; i++) {
        for (int j = 0; j < x; j++) {
            if (f[i][j] == '#') {
                ret++;
            }
        }
    }
    return ret;
}

int main() {
    int h,w,k; cin >> h >> w >> k;
    vector<string> f(h);
    for (int i = 0; i < h; i++) {
        cin >> f[i];
    }
    vector<int> sortedy(h), sortedx(w);
    for (int i = 0; i < h; i++) {
        sortedy[i] = i;
    }
    for (int i = 0; i < w; i++) {
        sortedx[i] = i;
    }
    int ans = 0;
    for (int yselect = 0; yselect < h; yselect++) {
        for (int xselect = 0; xselect < w; xselect++) {
            auto sx = sortedx;
            auto sy = sortedy;
            vector< vector<int> > combx, comby;
            do {
                vector<int> tmp;
                for (int i = 0; i < xselect; i++) {
                    tmp.push_back(sx[i]);
                }
                combx.push_back(tmp);
            } while (next_combination(sx.begin(), sx.end(), xselect));
            
            do {
                vector<int> tmp;
                for (int i = 0; i < yselect; i++) {
                    tmp.push_back(sy[i]);
                }
                comby.push_back(tmp);
            } while (next_combination(sy.begin(), sy.end(), yselect));
            /*
            cout << "y choose " << yselect << endl;
            for (int i = 0; i < (int)comby.size(); i++) {
                cout << "-- ";
                for (int ii = 0; ii < (int)comby[i].size(); ii++) {
                    cout << comby[i][ii] << " ";
                }
                cout << endl;
            }
            */
            for (int i = 0; i < (int)comby.size(); i++) {
                for (int j = 0; j < (int)combx.size(); j++) {
                    auto filled = fillf(comby[i], combx[j], f);
                    auto ret = cntf(filled);
                    if (ret == k) {

                        ans++;
                    }
                }
            }
        }
    }
    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 3212