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 <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <ctime>
#include <complex>
#include <cassert>
#include <array>
#include <bitset> 
#include <unordered_map>
#include <random>

using namespace std;
typedef long long LL;
typedef pair<int,int> P;

char s[302][302];
int t[601][601];
int d0[601][601];
int d1[601][601];

int main() {
	int H,W;
	cin >> H >> W;
	for(int i=0;i<H;i++){
		cin >> s[i];
		for(int j=0;j<W;j++){
			if(s[i][j]=='#'){
				t[1+i+j][1+i+W-j]=1;
			}
		}
	}
	int S=W+H;
	for(int i=1;i<=S;i++){
		for(int j=1;j<=S;j++){
			d0[i][j]=d1[i][j]=t[i][j];
			d0[i][j]+=d0[i-1][j];
			d1[i][j]+=d1[i][j-1];
		}
	}
	int ret=0;
	for(int i=1;i<=S;i++){
		for(int j=1;j<=S;j++){
			if(!t[i][j])continue;
			for(int k=j+1;k<=S;k++){
				if(!t[i][k])continue;
				int d=k-j;
				if(i-d>=1){
					ret+=d1[i-d][k]-d1[i-d][j-1];
				}
				if(i+d<=S){
					ret+=d1[i+d][k]-d1[i+d][j-1];
				}
			}
			for(int k=i+2;k<=S;k++){
				if(!t[k][j])continue;
				int d=k-i;
				if(j-d>=1){
					ret+=d0[k-1][j-d]-d0[i][j-d];
				}
				if(j+d<=S){
					ret+=d0[k-1][j+d]-d0[i][j+d];
				}
			}
		}
	}

	cout << ret << endl;

	return 0;
}

