void main() {
  problem();
}

void problem() {
  auto H = scan!int;
  auto W = scan!int;
  auto K = scan!int;
  auto MAP = H.iota.map!(x => scan).array;

  long solve() {
    long ans;

    foreach(wx; 0..2^^(W)) {
      auto w = (W+1).iota.map!(b => wx >> b & 1).array;
      foreach(hx; 0..2^^(H)) {
        auto h = (H+1).iota.map!(b => hx >> b & 1).array;

        w.deb;
        h.deb;

        int count;
        foreach(x; 0..W) {
          foreach(y; 0..H) {
            if (w[x] == 0 && h[y] == 0) {
              if (MAP[y][x] == '#') count++;
            }
          }
        }

        if (count == K) ans++;
        count.deb;
      }
      "----".deb;
    }

    return ans;
  }

  solve().writeln;
}

// ----------------------------------------------

import std.stdio, std.conv, std.array, std.string, std.algorithm, std.container, std.range, core.stdc.stdlib, std.math, std.typecons, std.numeric;
T[][] combinations(T)(T[] s, in int m) {   if (!m) return [[]];   if (s.empty) return [];   return s[1 .. $].combinations(m - 1).map!(x => s[0] ~ x).array ~ s[1 .. $].combinations(m); }
string scan(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
T scan(T)(){ return scan.to!T; }
T[] scan(T)(int n){ return n.iota.map!(i => scan!T()).array; }
void deb(T ...)(T t){ debug writeln(t); }
alias Point = Tuple!(long, "x", long, "y");

// -----------------------------------------------
