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
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <math.h>
#include <complex>
#include <cassert>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pr;
typedef complex<double> com;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const ll INF = 1e18;


int main() { 
	int h,w; cin>>h>>w;
	vector<string> b(h);
	rep(i,0,h) cin>>b[i];
	vector<vector<bool>> coin(h+w);
	rep(i,0,h+w) coin[i].resize(h+w,false);
	vector<vector<int>> sum(h+w);
	rep(i,0,h+w) sum[i].resize(h+w,0);
	rep(i,0,h)rep(j,0,w){
		if(b[i][j]=='#'){
			coin[i+j][i-j+w-1]=true;
			sum[i+j][i-j+w-1]=1;
		}
	}
	h+=w;
	rep(i,0,h)rep(j,0,h){
		if(j!=0) sum[i][j]+=sum[i][j-1];
	}
  	ll ans=0;
	rep(i,0,h)rep(j,0,h)rep(k,j+1,h){
		if(coin[i][j]&&coin[i][k]){
			int dis=k-j;
			if(i-dis>=0)ans+=sum[i-dis][k]-(j==0?0:sum[i-dis][j-1]);
			if(i+dis<h)ans+=sum[i+dis][k]-(j==0?0:sum[i+dis][j-1]);
		}
	}
	rep(i,0,h)rep(j,0,h){
		sum[i][j]=0;
	}
	h-=w;
	rep(i,0,h)rep(j,0,w){
		if(b[i][j]=='#'){
			sum[i+j][i-j+w-1]=1;
		}
	}
	h+=w;
	rep(i,0,h)rep(j,0,h){
		if(i!=0) sum[i][j]+=sum[i-1][j];
	}
	rep(i,0,h)rep(j,0,h)rep(k,j+1,h){
		if(coin[j][i]&&coin[k][i]){
			int dis=k-j;
			if(i-dis>=0)ans+=sum[k][i-dis]-(j==0?0:sum[j-1][i-dis])-coin[j][i-dis]-coin[k][i-dis];
			if(i+dis<h) ans+=sum[k][i+dis]-(j==0?0:sum[j-1][i+dis])-coin[j][i+dis]-coin[k][i+dis];
		}
	}
	cout<<ans<<endl;
	return 0;
}
