using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var h = input[0];
            var w = input[1];
            var k = input[2];

            var grid = new string[6, 6];

            for (int i = 0; i < h; i++)
                for (int j = 0; j < w; j++)
                    grid[i, j] = "";

            for (int i = 0; i < h; i++)
            {
                var input1 = Console.ReadLine();
                for (int j = 0; j < w; j++)
                    grid[i, j] = input1[j].ToString();
            }

            var c1 = new List<string> { "", "1", "2", "3", "4", "5", "6" };
            var c2 = new List<string> { "12", "13", "14", "15", "16", "23", "24", "25", "26", "34", "35", "36", "45", "46", "56" };
            var c3 = new List<string> { "123", "124", "125", "126", "134", "135", "136", "145", "146", "156", "234", "235", "236", "245", "246","256", "345", "346", "356", "456" };
            var c4 = new List<string> { "1234", "1235", "1236", "1245", "1246", "1256", "1345", "1346", "1356", "1456", "2345", "2346", "2356", "2456", "3456" };
            var c5 = new List<string> { "12345", "12346", "23456","12356", "12456", "13456" };
            var c6 = new List<string> { "123456" };

            int res = 0;

            var totalh = new List<string> { };
            totalh.AddRange(c1);
            if (h > 1)
                totalh.AddRange(c2);
            if (h > 2)
                totalh.AddRange(c3);
            if (h > 3)
                totalh.AddRange(c4);
            if (h > 4)
                totalh.AddRange(c5);
            if (h > 5)
                totalh.AddRange(c6);

            var totalw = new List<string> { };
            totalw.AddRange(c1);
            if (w > 1)
                totalw.AddRange(c2);
            if (w > 2)
                totalw.AddRange(c3);
            if (w > 3)
                totalw.AddRange(c4);
            if (w > 4)
                totalw.AddRange(c5);
            if (w > 5)
                totalw.AddRange(c6);


            for (int i = 0; i < totalh.Count(); i++)
            {
                for (int j = 0; j < totalw.Count(); j++)
                {
                    var sweeph = totalh[i];
                    var sweepw = totalw[j];

                    bool check = true;

                    for (int l = 0; l < sweeph.Length; l++)
                    {
                        int thish = int.Parse(sweeph[l].ToString()) - 1;
                        if (thish >= h)
                            check = false;
                    }

                    for (int l = 0; l < sweepw.Length; l++)
                    {
                        int thisw = int.Parse(sweepw[l].ToString()) - 1;
                        if (thisw >= w)
                            check = false;
                    }

                    if (!check)
                        continue;

                    var thisgrid = new string[6, 6];
                    for (int l = 0; l < h; l++)
                        for (int q = 0; q < w; q++)
                            thisgrid[l, q] = grid[l, q];

                    for (int l = 0; l < sweeph.Length; l++)
                    {
                        //if (sweeph[i].ToString() == "") continue;
                        int thish = int.Parse(sweeph[l].ToString()) - 1;
                        for (int q = 0; q < w; q++)
                            thisgrid[thish, q] = "";
                    }

                    for (int l = 0; l < sweepw.Length; l++)
                    {
                        //if (sweepw[i].ToString() == "") continue;
                        int thisw = int.Parse(sweepw[l].ToString()) - 1;
                        for (int q = 0; q < h; q++)
                            thisgrid[q, thisw] = "";
                    }

                    int cnt = 0;
                    for (int l = 0; l < h; l++)
                        for (int q = 0; q < w; q++)
                            if (thisgrid[l, q] == "#")
                                cnt++;

                    if (k == cnt)
                        res++;
                }
            }

            Console.WriteLine(res);

        }


    }
}


Measured memory_bytes: 30664