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: %c", char))
			}
		}
	}

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

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

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

	fmt.Println(count)
}

func countColor(targetColor color, c [][]color) int {
	count := 0
	for _, ci := range c {
		for _, cij := range ci {
			if cij == targetColor {
				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, callback func(bits []bool)) {
	for deci := 0; deci < 1<<bitsLen; deci++ {
		bits := make([]bool, bitsLen)
		for digit := 0; digit < bitsLen; digit++ {
			bits[bitsLen-1-digit] = deci&(1<<digit) > 0
		}

		callback(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: 3648