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 <bits/stdc++.h>

using namespace std;

typedef long long LL;
typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define PB(a) push_back(a)
#define MP(a , b) make_pair((a) , (b))
#define M3P(a , b , c) make_pair(make_pair((a) , (b)) , (c))
#define M4P(a , b , c , d) make_pair(make_pair((a) , (b)) , make_pair((c) , (d)))
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)

const int MC = 333;
int H,W;
int c[MC*2][MC*2];
int sh[MC*2][MC*2],sw[MC*2][MC*2];

int main(){
	cin >> H >> W;
	repp(i,0,H){
		string s; cin >> s;
		repp(j,0,W) c[i+1+j+1][i-j+MC] = sh[i+j+2][i-j+MC] = sw[i+j+2][i-j+MC] = (s[j]=='#'?1:0);
	}
	int z = W+H;
	W = H+MC;
	H = z;
	repp(i,0,H+1) repp(j,0,W+1){
		sh[i+1][j] += sh[i][j];
		sw[i][j+1] += sw[i][j];
	}
	LL ans = 0;
	repp(i,1,H+1) repp(j,1,W+1) repp(k,j+1,W+1){
		if(!c[i][j] || !c[i][k]) continue;
		int d = k-j;
		if(d < i) ans += sw[i-d][k] - sw[i-d][j-1];
		if(i+d <= H) ans += sw[i+d][k] - sw[i+d][j-1];
	}
	repp(j,1,W+1) repp(i,1,H+1) repp(k,i+1,H+1){
		if(!c[i][j] || !c[k][j]) continue;
		int d = k-i;
		if(d < j) ans += sh[k-1][j-d] - sh[i][j-d];
		if(j+d <= W) ans += sh[k-1][j+d] - sh[i][j+d];
	}
	cout << ans << endl;
	return 0;
}
