There are some coins in the xy-plane. The positions of the coins are represented by a grid of characters with H rows and W columns. If the character at the i-th row and j-th column, s_{ij}, is `#`, there is one coin at point (i,j); if that character is `.`, there is no coin at point (i,j). There are no other coins in the xy-plane.

There is no coin at point (x,y) where 1\leq i\leq H,1\leq j\leq W does not hold. There is also no coin at point (x,y) where x or y (or both) is not an integer. Additionally, two or more coins never exist at the same point.

Find the number of triples of different coins that satisfy the following condition:

* Choosing any two of the three coins would result in the same Manhattan distance between the points where they exist.



Here, the Manhattan distance between points (x,y) and (x',y') is |x-x'|+|y-y'|. Two triples are considered the same if the only difference between them is the order of the coins.

Constraints

* 1 \leq H,W \leq 300
* s_{ij} is `#` or `.`.

Input

Input is given from Standard Input in the following format:


H W
s_{11}...s_{1W}
:
s_{H1}...s_{HW}


Output

Print the number of triples that satisfy the condition.

Examples

Input

5 4
#.##
.##.
#...
..##
...#


Output

3


Input

5 4
.##
.##.
...
..##
...#


Output

3


Input

13 27
......#.........#.......#..
...#.....###..
..............#####...##...
...#######......#...#######
...#.....#.....###...#...#.
...#######....#.#.#.#.###.#
..............#.#.#...#.#..
.#.#.#...###..
...........#...#...#######
..#######..#...#...#.....#
..#.....#..#...#...#.###.#
..#######..#...#...#.#.#.#
..........##...#...#.#####


Output

870
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

template <typename Tp> inline void getint(Tp &num){
	register int ch, neg = 0;
	while(!isdigit(ch = getchar())) if(ch == '-') neg = 1;
	num = ch & 15;
	while(isdigit(ch = getchar())) num = num * 10 + (ch & 15);
	if(neg) num = -num;
}

int H, W, N, sum[605][605], ans; char str[305];
vector<int> r[605], c[605];

inline int calcr(int x, const int &l, const int &r){
	if(l > r || x < 1 || x > N) return 0;
	return sum[x][r] - sum[x - 1][r] - sum[x][l - 1] + sum[x - 1][l - 1];
}

inline int calcc(const int &d, const int &u, int y){
	if(d > u || y < 1 || y > N) return 0;
	return sum[u][y] - sum[u][y - 1] - sum[d - 1][y] + sum[d - 1][y - 1];
}

int main(){
	getint(H), getint(W), N = H + W;
	for(register int i = 1; i <= H; i++){
		scanf("%s", str + 1);
		for(register int j = 1; j <= W; j++) if(str[j] == '#'){
			sum[i + j][i - j + W]++;
			r[i + j].push_back(i - j + W);
			c[i - j + W].push_back(i + j);
		}
	}
	for(register int i = 1; i <= N; i++)
		for(register int j = 1; j <= N; j++)
			sum[i][j] += sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1];
	for(register int i = 1; i <= N; i++){
		sort(r[i].begin(), r[i].end());
		for(register int j = 0, siz = r[i].size(); j < siz; j++)
			for(register int k = j + 1; k < siz; k++){
				const int d = r[i][k] - r[i][j];
				ans += calcr(i - d, r[i][j], r[i][k]);
				ans += calcr(i + d, r[i][j], r[i][k]);
			}
		sort(c[i].begin(), c[i].end());
		for(register int j = 0, siz = c[i].size(); j < siz; j++)
			for(register int k = j + 1; k < siz; k++){
				const int d = c[i][k] - c[i][j];
				ans += calcc(c[i][j] + 1, c[i][k] - 1, i - d);
				ans += calcc(c[i][j] + 1, c[i][k] - 1, i + d);
			}
	}
	return printf("%d\n", ans), 0;
}