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 <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;

typedef long long ll;
const ll M = 998244353;

int main(){
	static ll H,W;
	static char s[302][302];
	scanf("%lld%lld",&H,&W);
	for(int i = 1 ; i <= H ; i ++){
		scanf("\n");
		for(int j = 1 ; j <= W ; j ++){
			scanf("%c",&s[i][j]);
		}
	}
	
	static ll a[605][605] = {};
	static ll b[605][605] = {};
	static ll c[605][605] = {};
	for(int i = 1 ; i <= H ; i ++){
		for(int j = 1 ; j <= W ; j ++){
			if(s[i][j] == '#')a[i+j][i-j+302] = 1;
			b[i+j][i-j+302] = a[i+j][i-j+302];
			c[i+j][i-j+302] = a[i+j][i-j+302];
		}
	}
	for(int i = 2 ; i <= 600 ; i ++){
		for(int j = 1 ; j <= 602 ; j ++){
			b[i][j] += b[i][j-1];
		}
	}
	
	//cout << a[2][302] << endl;
	//cout << b[2][302] << endl;
	//cout << b[2][299] << endl;
	
	ll ret = 0;
	for(int i = 2 ; i <= 600 ; i ++){
		for(int j = 2 ; j <= 602 ; j += 2){
			if((i+j)&1)j ++;
			if(a[i][j] == 0)continue;
			for(int k = j+2 ; k <= 602 ; k += 2){
				if(a[i][k] == 0)continue;
				if(i-k+j >= 0)ret += b[i-(k-j)][k]-b[i-(k-j)][j-1];
				if(i+k-j < 605)ret += b[i+(k-j)][k]-b[i+(k-j)][j-1];
			}
		}
	}
	//cout << ret << endl;
	
	for(int j = 2 ; j <= 602 ; j ++){
		for(int i = 2 ; i <= 600 ; i ++){
			c[i][j] += c[i-1][j];
		}
	}
	for(int j = 2 ; j <= 602 ; j ++){
		for(int i = 2 ; i <= 600 ; i += 2){
			if((i+j)&1)i ++;
			if(a[i][j] == 0)continue;
			for(int k = i+2 ; k <= 600 ; k += 2){
				if(a[k][j] == 0)continue;
				if(j-k+i >= 0)ret += c[k-1][j-(k-i)]-c[i+1][j-(k-i)];
				if(j+k-i < 605)ret += c[k-1][j+(k-i)]-c[i+1][j+(k-i)];
			}
		}
	}
	cout << ret << endl;
}
	