Imports System

Module Program
    Sub Main(args As String())

        Dim HWK() As Integer = Console.ReadLine().Split(" ").Select(Function(x) Integer.Parse(x)).ToArray()

        Dim c As New List(Of Integer)

        Dim kuroBak As New List(Of Integer)


        For i As Integer = 0 To HWK(0) - 1
            Dim tmp As String = Console.ReadLine()
            For j As Integer = 0 To HWK(1) - 1
                If Mid(tmp, j + 1, 1) = "#" Then
                    kuroBak.Add(i * 6 + j + 1)
                End If
            Next
        Next

        Dim r As Integer = 0

        For i As Integer = 0 To 2 ^ HWK(0)
            For j As Integer = 0 To 2 ^ HWK(1)
                Dim kuro As List(Of Integer) = New List(Of Integer)(kuroBak)
                ' remove
                If kuro.Count() = HWK(2) Then
                    r += 1
                End If
            Next
        Next

        Console.WriteLine(r)

    End Sub

End Module
