package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

const (
	colorWhite = 0
	colorBlack = 1
	colorRed   = 2
)

type color int

func main() {
	sc := NewScanner()

	h := sc.ReadInt()
	w := sc.ReadInt()
	k := sc.ReadInt()
	c := make([][]color, h)
	for i := 0; i < h; i++ {
		ci := make([]color, w)
		c[i] = ci
		line := sc.ReadString()
		for j, char := range line {
			switch char {
			case '.':
				ci[j] = colorWhite
			case '#':
				ci[j] = colorBlack
			default:
				panic(fmt.Sprintf("unexpcted character: %v", char))
			}
		}
	}

	count := 0
	AllBits(h, func(lineBits []bool) {
		redlinedSquares := cloneColors(c)
		for i, willLine := range lineBits {
			if willLine {
				for j := 0; j < w; j++ {
					redlinedSquares[i][j] = colorRed
				}
			}
		}

		AllBits(w, func(columnBits []bool) {
			squares := cloneColors(redlinedSquares)
			for j, willCol := range columnBits {
				if willCol {
					for i := 0; i < h; i++ {
						squares[i][j] = colorRed
					}
				}
			}

			if countColor(colorBlack, squares) == k {
				count++
			}
		})
	})

	fmt.Println(count)
}

func countColor(target color, c [][]color) int {
	count := 0
	for _, ci := range c {
		for _, cij := range ci {
			if cij == target {
				count++
			}
		}
	}
	return count
}

func cloneColors(src [][]color) [][]color {
	dst := make([][]color, len(src))
	for i, srcLine := range src {
		dstLine := make([]color, len(srcLine))
		dst[i] = dstLine

		for j, srcColor := range srcLine {
			dstLine[j] = srcColor
		}
	}
	return dst
}

func AllBits(bitsLen int, f func(bits []bool)) {
	for k := 0; k < Pow(2, uint(bitsLen)); k++ {
		bits := make([]bool, bitsLen)
		for i := 0; i < bitsLen; i++ {
			mask := Pow(2, uint(i))
			if k&mask > 0 {
				bits[bitsLen-1-i] = true
			}
		}

		f(bits)
	}
}

// from [my library](https://github.com/ikngtty/go-contestlib)
// -   math/simple

func Abs(x int) int {
	if x >= 0 {
		return x
	}
	return -x
}

func Min(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}
	min := values[0]
	for _, v := range values {
		if v < min {
			min = v
		}
	}
	return min
}

func Max(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}
	max := values[0]
	for _, v := range values {
		if v > max {
			max = v
		}
	}
	return max
}

func Pow(base int, exponent uint) int {
	answer := 1
	for i := uint(0); i < exponent; i++ {
		answer *= base
	}
	return answer
}

func Ceil(divident, dividor int) int {
	quo := divident / dividor
	rem := divident % dividor

	if rem != 0 {
		if (divident > 0 && dividor > 0) ||
			(divident < 0 && dividor < 0) {
			return quo + 1
		}
	}
	return quo
}

// -   sortutil

func ReverseInts(a []int) {
	sort.Sort(sort.Reverse(sort.IntSlice(a)))
}

func ReverseStrings(a []string) {
	sort.Sort(sort.Reverse(sort.StringSlice(a)))
}

// -   io

type Scanner struct {
	bufScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bufSc := bufio.NewScanner(os.Stdin)
	bufSc.Split(bufio.ScanWords)
	bufSc.Buffer(nil, 100000000)
	return &Scanner{bufSc}
}

func (sc *Scanner) ReadString() string {
	bufSc := sc.bufScanner
	bufSc.Scan()
	return bufSc.Text()
}

func (sc *Scanner) ReadInt() int {
	bufSc := sc.bufScanner
	bufSc.Scan()
	text := bufSc.Text()

	num, err := strconv.Atoi(text)
	if err != nil {
		panic(err)
	}
	return num
}


Measured memory_bytes: 3656