program ABC173C
    implicit none
    integer(8)::H,W,K,i,j,l,m,b_all=0,ans=0,calc
    character(8)::i_bit,j_bit
    character(6)::C(6)
    read*,H,W,K
    do i=1,H
        read*,C(i)
    end do

    do i=1,H
        do j=1,W
            if(C(i)(j:j)=="#")b_all=b_all+1
        end do
    end do

    do i=0,2**H-1
        write(i_bit,'(b8.8)')i
        do j=0,2**W-1
            write(j_bit,'(b8.8)')j
            calc=b_all
            !行方向
            do l=8-H+1,8
                if(i_bit(l:l)=="1")then
                    do m=1,W
                        if(C(l-8+H)(m:m)=="#")calc=calc-1
                    end do
                end if
            end do

            !列方向
            do l=8-W+1,8
                if(j_bit(l:l)=="1")then
                    do m=1,H
                        if(C(m)(l-8+W:l-8+W)=="#".and.i_bit(8-H+m:8-H+m)=="0")calc=calc-1
                    end do
                end if
            end do
            if(calc==K)ans=ans+1
        end do
    end do
    print'(i0)',ans
end program ABC173C