#include <bits/stdc++.h>
int main(void) {
  int H, W, K;
  scanf("%d %d %d ", &H, &W, &K);
  char c[6][6] = {'0'}, t[6][6] = {'0'};
  for (int i = 0; i < H; i++) {
    scanf("%s", c[i]);
  }
  for (int i = 0; i < 6; i++) {
    for (int j = 0; j < 6; j++) {
      t[i][j] = c[i][j];
    }
  }
  int cnt = 0, sh = 0, bit = 0;
  while (bit < pow(2, H + W)) {
    for (int i = 0; i < H; i++) {
      if (bit & (1 << i)) {
        for (int j = 0; j < W; j++) {
          c[i][j] = 'R';
        }
      }
    }
    for (int j = 0; j < W; j++) {
      if (bit & (1 << (H + j))) {
        for (int i = 0; i < H; i++) {
          c[i][j] = 'R';
        }
      }
    }
    for (int i = 0; i < H; i++) {
      for (int j = 0; j < W; j++) {
        if (c[i][j] == '#') sh++;
      }
    }
    if (sh == K) cnt++;
    for (int i = 0; i < H; i++) {
    }
    for (int i = 0; i < H; i++) {
      for (int j = 0; j < W; j++) {
        c[i][j] = t[i][j];
      }
    }
    sh = 0;
    bit++;
  }
  printf("%d", cnt);
  return 0;
}
