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<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
#include<cassert>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
//問題文および制約はちゃんと確認しよう！
//サイズは10^5じゃなくて2×10^5とかかもしれないし、重要な制約・条件を見落としているかも
//とりあえずサンプルを読んでから解法を考えよう？
#define N 605
int ma[N+10][N+10];
int dp[N+10][N+10],d2[N+10][N+10];
int main()
{
	int n,m;string s;
	//rep(i,N+10) ma[i]=string(N+10,'.');
	memset(ma,0,sizeof(ma));
	memset(dp,0,sizeof(dp));
	memset(d2,0,sizeof(d2));
	cin>>n>>m;
	rep(i,n){
		cin>>s;
		rep(j,m) ma[i+j][302+i-j]=(s[j]=='#');
	}
	rep(i,11){
		//REP(j,297,308) cout<<ma[i][j];cout<<endl;
	}
	rep(i,N){
		rep(j,N) dp[i][j+1]=dp[i][j]+ma[i][j],d2[i][j+1]=d2[i][j]+ma[j][i];
	}
	lint out=0;
	rep(i,N){
		rep(j,N) REP(k,j+1,N){
			if(ma[i][j]+ma[i][k]<2) continue;
			if(i>=k-j) out+=dp[i-(k-j)][k+1]-dp[i-(k-j)][j];
			if(i+k-j<=N) out+=dp[i+k-j][k+1]-dp[i+k-j][j];
		}
		rep(j,N) REP(k,j+1,N){
			if(ma[j][i]+ma[k][i]<2) continue;
			if(i>=k-j) out+=d2[i-(k-j)][k+1]-d2[i-(k-j)][j];
			if(i+k-j<=N) out+=d2[i+k-j][k+1]-d2[i+k-j][j];
		}
	}
	//cout<<out<<endl;
	rep(i,N) rep(j,N){
		if(ma[i][j]<1) continue;
		REP(k,1,N){
			if(i-k>=0 && j-k>=0 && ma[i-k][j]+ma[i][j-k]==2) out--;
			if(i+k<=N && j-k>=0 && ma[i+k][j]+ma[i][j-k]==2) out--;
			if(i-k>=0 && j+k<=N && ma[i-k][j]+ma[i][j+k]==2) out--;
			if(i+k<=N && j+k<=N && ma[i+k][j]+ma[i][j+k]==2) out--;
		}
	}
	cout<<out<<endl;
}
