import java.util.ArrayList;
import java.util.HashMap;
public class Main {
//change arraylists to strings, as they present single lines of text, the row number functions as
//the key. you need to change all the function calls and shit.
private static int hits;
public static void main(String[] args) {
IO io = new IO();
int height = io.nextInt();
int width = io.nextInt();
int trees = io.nextInt();
hits = 0;
// HashMap<Integer,ArrayList<String>> woods = new HashMap<>();
ArrayList<String> woods = new ArrayList<>();
for (int i = 0; i < height; i++) {
woods.add(io.next());
}
int smallest = height;
if (height > width) {
smallest = width;
}
iterateThroughAllSquares(width,height,smallest, woods, trees);
io.println(hits);
io.close();
}
private static void searchSquare(int startx, int starty, int size,
ArrayList<String> woods, int trees) {
int temphits = 0;
for (int i = startx; i < size; i++) {
for (int j = starty; j < size; j++) {
if (woods.get(j).charAt(i)=='*') {
temphits++;
}
}
}
if (temphits==trees) {
hits++;
}
System.out.println(hits);
}
//in this function, the grid starts from 0,0 in the left upper corner
private static void iterateThroughAllSquares(int width, int height, int size,
ArrayList<String> woods, int trees) {
for (int i = 0; i <= width-size; i++) {
for (int j = 0; j <= height-size; j++) {
searchSquare(i, j, size, woods, trees);
}
}
//calls itself here
if (size*size >= trees) {
iterateThroughAllSquares(width, height, size-1, woods, trees, hits);
}
}
}