using System;
using System.Collections.Generic;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            // Console.WriteLine(IsOn(2, 0));
            // Console.WriteLine(IsOn(2, 1));
            
            Exec(args);
            // QuestionC.Main(args);
            Console.Out.Flush();
        }

        private static void Exec(string[] args)
        {
            var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);

            // 文字列の入力
            var inputs = Console.ReadLine().Split(' ');

            int H = int.Parse(inputs[0]);
            int W = int.Parse(inputs[1]);
            int K = int.Parse(inputs[2]);
            
            List<char> field = new List<char>();
            
            for (var i = 0; i < H; i++)
            {
                var line = Console.ReadLine().ToCharArray();
                field.AddRange(line);
            }

            // int hp = Factorial(H);
            // int wp = Factorial(W);

            int hp = (int)Math.Pow(2, H);
            int wp = (int)Math.Pow(2, W);

            int result = 0;

            // 何列目をONにするか
            for (var selectedW = 0; selectedW < wp; selectedW++)
            {
                // 何行目をONにするか
                for (var selectedH = 0; selectedH <hp; selectedH++)
                {
                    char[] field_c = new char[field.Count];
                    field.CopyTo(field_c);
                    
                    // 列    
                    for (var windex = 0; windex < W; windex++)
                    {
                        if (IsOn(selectedW, windex))
                        {
                            for (var h = 0; h < H; h++)
                            {
                                field_c[h*W+windex] = 'R';    
                            }
                        }
                    }
                    
                    // 行
                    for (var hindex = 0; hindex < H; hindex++)
                    {
                        if (IsOn(selectedH, hindex))
                        {
                            for (var w = 0; w < W; w++)
                            {
                                field_c[hindex*W+w] = 'R';
                            }
                        }
                    }

                    var count = 0;
                    foreach (var cell in field_c)
                    {
                        if (cell == '#') count++;
                    }

                    var res = new string(field_c);
                    // if (selectedW == 0 | selectedH == 0) Console.WriteLine($"{selectedW} {selectedH} {res}");

                    if (count == K)
                    {
                        result++;
                    }
                }
            }

            Console.WriteLine(result);

            Console.Out.Flush();
        }
        
        public static int Factorial(int n) 
        {
            if (n == 0)
                return 1;
            return n * Factorial(n - 1);
        }

        public static bool IsOn(int n, int index)
        {
            n >>= index;
            return (n & 0b0001) == 1;
        }
        
        static void Debug(string[] args)
        {
            Console.WriteLine("test");
        }
    }
}


Measured memory_bytes: 28852