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;

#ifdef DEBUG_MODE
	#define DBG(n) n;
#else
	#define DBG(n) ;
#endif
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 1000000007

typedef long long ll;
typedef pair<ll,ll> P;

int mp[666][666];
int sum[666][666];
int sum1[666][666];

int main(){

	int h,w;cin >> h >> w;
	REP(i,h){
		REP(j,w){
			char tmp;cin >> tmp;
			if(tmp == '#'){
				mp[i+j][h-i+j] = 1;
				sum[i+j][h-i+j] = 1;
				sum1[i+j][h-i+j] = 1;
			}
		}
	}

	REP(i,666){
		REP(j,666){
			if(j < 665)sum[i][j+1] += sum[i][j];
			if(i < 665)sum1[i+1][j] += sum1[i][j];
		}
	}
	ll ans = 0;

	REP(i,666){
		vector<int> v;
		REP(j,666){
			if(mp[i][j]){
				REP(k,v.size()){
					int tmp = j - v[k];
					if(i - tmp >= 0){
						ans += sum[i-tmp][j] - sum[i-tmp][j-tmp-1];
					}
					if(i + tmp < 666){
						ans += sum[i+tmp][j] - sum[i+tmp][j-tmp-1];
					}
				}
				v.PB(j);
			}
		}
	}

	REP(j,666){
		vector<int> v;
		REP(i,666){
			if(mp[i][j]){
				REP(k,v.size()){
					int tmp = i - v[k];
					if(j - tmp >= 0){
						ans += sum1[i-1][j-tmp] - sum1[i-tmp][j-tmp];
					}
					if(j + tmp < 666){
						ans += sum1[i-1][j+tmp] - sum1[i-tmp][j+tmp];
					}
				}
				v.PB(i);
			}
		}
	}

	cout << ans << endl;

	return 0;
}
