H, W, K = gets.chomp.split.map &:to_i
c = Array.new(H).map{Array.new(W,'w')}

H.times do |i| 
  arr = gets.chomp.chars
  arr.each_with_index do |a,j|
    c[i][j] = 'b' if a == "#"
  end
end

ans = 0

#行-列の走査
H.times do |i|
  W.times do |j|
    hw_cnt = 0
    H.times do |i2|        
      next if i2 == i
      W.times do |j2|
        next if j2 == j
        hw_cnt += 1 if c[i2][j2] == 'b'
      end
    end
    ans += 1 if hw_cnt == K
  end
end

#列-列の走査
W_arr = [*0...W]
com = W_arr.repeated_combination(2).to_a
com.each do |tg_j, tg_j2|
  ww_cnt = 0
  H.times do |i2|        
# next if i2 == tg_i || i2 == tg_i2
    W.times do |j2|
      next if j2 == tg_j || j2 == tg_j2
      ww_cnt += 1 if c[i2][j2] == 'b'
      end
    end
  ans += 1 if ww_cnt == K
end

#行-行の走査
H_arr = [*0...H]
com = H_arr.repeated_combination(2).to_a
com.each do |tg_i, tg_i2|
  hh_cnt = 0
  H.times do |i2|        
    next if i2 == tg_i || i2 == tg_i2
    W.times do |j2|
      hh_cnt += 1 if c[i2][j2] == 'b'
      end
    end
  ans += 1 if hh_cnt == K
end

#何も選ばない
cnt = 0
H.times do |i|
  W.times do |j|
    cnt += 1 if c[i][j] == 'b'
  end
end
ans += 1 if cnt == K

p ans

