h, w , kkk = gets.chomp.split(" ").map(&:to_i)
arr = []
h.times do 
    a = gets.chomp.split("")
    arr << a
end
max = []
["o","x"].repeated_permutation (h) do |i|
    hairetsu = []
    i.each_with_index do |ii,bangou|
        if ii == "o"
             arr_size = arr[bangou].size
             ar = []
             arr_size.times do
                ar << "%"
             end
        hairetsu  << ar
            
        end
        if ii == "x"
            hairetsu << arr[bangou]
        end
    end
    max << hairetsu
end

count = 0
# max.each do |k|
#     ["o","x"].repeated_permutation (w) do |i|
#         i.each_with_index do |ii,bangou|
#             if ii == "o"
#                 h.times do |l|
#                      k[l][bangou].fill("%")
#                 end
#            end
#         end
#         p k
#         kk = k.count(".")
#         if kk == kkk
#             count += 1
#         end
#     end
# end

max.each do |k|
   
    max = []
    k = k.transpose
    ["o","x"].repeated_permutation (w) do |i|
        ookisa = 0
        hairetsu = []
        i.each_with_index do |ii,bangou|
            if ii == "o"
                arr_size = k[bangou].size
                ar = []
                arr_size.times do
                    ar << "%"
                end
            hairetsu  << ar
                
            end
            if ii == "x"
                hairetsu << k[bangou]
            end
        end
        max << hairetsu
        max = max.flatten
        #p max
        ookisa = max.count("#")
        max = []
        if ookisa == kkk
            count += 1
        end
    end
end
puts count