#pragma region Macros
// ===========
// include
// ===========
#include <iostream>
#include <vector>
#include <cstdint>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

// ===========
// typedef
// ===========
typedef int64_t int64;
typedef vector<int64> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;

// ===========
// conversion
// ===========
inline int toInt(string s)
{
    int v;
    istringstream sin(s);
    sin >> v;
    return v;
}
template <class T>
inline string toString(T x)
{
    ostringstream sout;
    sout << x;
    return sout.str();
}

// ===========
// math
// ===========
template <class T>
inline T sqr(T x) { return x * x; }
inline int64 Factorial(int64 n) { return n == 0 ? 0 : (n == 1 ? 1 : Factorial(n - 1) * n); }

// ===========
// repetition
// ===========
#define rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a), __length = int(b); i < __length; ++i)

void input(vector<int64> *vec, const int size)
{
    vec->resize(size);
    rep(i, size) { cin >> vec->at(i); }
}
void input(vector<string> *vec, const int size)
{
    vec->resize(size);
    rep(i, size) { cin >> vec->at(i); }
}

#pragma endregion //Macros

int main()
{
    //cout << Factorial(1) << endl;
    int H, W, K;
    cin >> H >> W >> K;

    VS row, col;
    input(&row, H);

    col.resize(W);
    rep(x, W)
    {
        string &c = col.at(x);
        rep(y, H)
        {
            c += row.at(y).at(x);
        }
    }

    VI rowC, colC;
    rowC.resize(H);
    colC.resize(W);

    int all = 0;

    rep(i, H)
    {
        const string &rowS = row.at(i);
        rowC.at(i) = count(rowS.begin(), rowS.end(), '#');
        // cout << "row " << i << " : " << rowC.at(i) << endl;
        all += rowC.at(i);
    }

    rep(i, W)
    {
        const string &colS = col.at(i);
        colC.at(i) = count(colS.begin(), colS.end(), '#');
        // cout << "col " << i << " : " << colC.at(i) << endl;
    }

    int ansNum = 0;
    if (all < K)
    {
        cout << ansNum << endl;
        return 0;
    }

    // cout << "all = " << all << endl;

   
    // cout << "ansNum = " << ansNum << endl;

    const int needDel = all - K;

    // cout << "needDel = " << needDel << endl;

    int rowMax = pow(2, H);
    int colMax = pow(2, W);

    VI sumRowC, sumColC;
    sumRowC.resize(rowMax);
    sumColC.resize(colMax);

    rep(x, rowMax)
    {
        int sum = 0;
        // cout << " x = " << x << ":";
        rep(i, H)
        {
            int shift = x >> i;
            if (shift & 1)
            {
                sum += rowC.at(i);
            }
        }
        sumRowC.at(x) = sum;
        // cout << sumRowC.at(x) << endl;
    }

    rep(y, colMax)
    {
        int sum = 0;
        // cout << " y = " << y << ":";
        rep(i, W)
        {
            int shift = y >> i;
            if (shift & 1)
            {
                sum += colC.at(i);
            }
        }
        sumColC.at(y) = sum;
        // cout << sumRowC.at(y) << endl;
    }

    rep(y, rowMax)
    {
        const int rowDel = sumRowC.at(y);
        if (rowDel > needDel)
        {
            continue;
        }

        rep(x, colMax)
        {
            int sumDel = rowDel + sumColC.at(x);
            if (sumDel >= needDel)
            {
                rep(j, H)
                {
                    int shiftY = y >> j;
                    if (shiftY & 1)
                    {
                        rep(i, W)
                        {
                            int shiftX = x >> i;
                            if( shiftX & 1 )
                            {
                                if( row.at(j).at(i) == '#')
                                {
                                    --sumDel;
                                }
                            }
                        }
                    }
                }
            }

            if( sumDel == needDel )
            {
                ++ansNum;
            }
        }
    }

    // rep(y, H)
    // {
    //     int delNum = rowC.at(y);
    //     // 列なし
    //     if (delNum == needDel)
    //     {
    //         ++ansNum;
    //         cout << y << ":"
    //              << " " << endl;
    //     }
    //     cout << "y = " << y + 1 << ":" << 0 << endl;

    //     rep(x, W)
    //     {
    //         delNum = rowC.at(y) + colC.at(x);
    //         if (row.at(y).at(x) == '#')
    //         {
    //             --delNum;
    //         }
    //         if (delNum == needDel)
    //         {
    //             ++ansNum;
    //             cout << y + 1 << ":" << x + 1 << endl;
    //         }
    //     }
    // }

    cout << ansNum << endl;

    return 0;
}


Measured memory_bytes: 3988