const chunks = [];
process.stdin.on("data", (chunk) => {
  chunks.push(chunk);
});
process.stdin.on("end", () => {
  const data = Buffer.concat(chunks).toString("utf8").trim();
  const lines = data.split("\n");
  const [H, W, K] = lines[0].split(" ").map((item) => parseInt(item, 10));
  const C = lines.slice(1, H + 1).map((line) => line.split(""));
  console.log(solve(H, W, K, C));
});

function solve(H, W, K, C) {
  const allBlack = countBlack(C);
  if (K > allBlack) return 0;
  if (K === allBlack) return 1;

  let count = 0;
  backtrackRow(0);
  return count;

  function backtrackRow(row) {
    if (row === H) {
      backtrackCol(0);
      return;
    }

    // Keep this row.
    backtrackRow(row + 1);

    // Remove this row.
    const original = C[row].slice(0);
    fillRedRow(row);
    backtrackRow(row + 1);
    C[row] = original;
  }
  function backtrackCol(col) {
    if (col === W) {
      if (countBlack(C) === K) {
        count++;
      }
      return;
    }

    backtrackCol(col + 1);

    const original = copyCol(col);
    fillRedCol(col);
    backtrackCol(col + 1);
    revertCol(col, original);
  }
  function fillRedRow(row) {
    for (let i = 0; i < W; i++) {
      C[row][i] = "r";
    }
  }

  function copyCol(col) {
    const result = [];
    for (let i = 0; i < H; i++) {
      result.push(C[i][col]);
    }
    return result;
  }
  function fillRedCol(col) {
    for (let i = 0; i < H; i++) {
      C[i][col] = "r";
    }
  }
  function revertCol(col, original) {
    for (let i = 0; i < H; i++) {
      C[i][col] = original[i];
    }
  }
}

function countBlack(C) {
  let count = 0;
  for (const line of C) {
    for (const cell of line) {
      if (cell === "#") count++;
    }
  }
  return count;
}
