You are given a *n* × *m* field consisting only of periods ('.') and asterisks ('*'). Your task is to count all right triangles with two sides parallel to the square sides, whose vertices are in the centers of '*'-cells. A right triangle is a triangle in which one angle is a right angle (that is, a 90 degree angle).
The first line contains two positive integer numbers *n* and *m* (1 ≤ *n*, *m* ≤ 1000). The following *n* lines consist of *m* characters each, describing the field. Only '.' and '*' are allowed.
a,b = map(int,input().split())
matrix = []
scoluna = [0 for i in range(b)]
slinha = [0 for i in range(a)]
for i in range(a):
    matrix.append(input())
    for j in range(b):
        if matrix[-1][j] == ".":
            continue
        slinha[i] = slinha[i] + 1
        scoluna[j] = scoluna[j] + 1
# print(scoluna,slinha)
res = 0
for i in range(a):
    # print(matrix[i])
    for j in range(b):
        # print(matrix[i][j],end = ' ')
        if matrix[i][j] == "*":
            res += (scoluna[j]-1)*(slinha[i]-1)
#     print(slinha[i])
# print(scoluna)
print(res)