H,W,K=gets.chomp.split.map(&:to_i)
c=[]
H.times do |h|
  c[h]=gets.chomp.split('')
end

ans = 0
[0,1].repeated_permutation(H) do |harr|
  [0,1].repeated_permutation(W) do |warr|
    cc = Marshal.load(Marshal.dump(c))
    H.times do |h|
      next if harr[h].zero?

      W.times do |w|
        cc[h][w] = '.'
      end
    end

    W.times do |w|
      next if warr[w].zero?

      H.times do |h|
        cc[h][w] = '.'
      end
    end

    count = 0
    H.times do |h|
      W.times do |w|
        count += 1 if cc[h][w] == '#'
      end
    end

    ans += 1 if count == K
  end
end
p ans
