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>
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#include <time.h>
#define dibs reserve
#define OVER9000 1234567890
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-8
#define chocolate win
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) (((x) < 0)?-(x):(x))
#define uint unsigned int
#define dbl long double
#define pi 3.14159265358979323846
using namespace std;
// mylittledoge

using cat = long long;

#ifdef DONLINE_JUDGE
	// palindromic tree is better than splay tree!
	#define lld I64d
#endif

int main() {
	cin.sync_with_stdio(0);
	cin.tie(0);
	cout << fixed << setprecision(10);
	int H, W;
	cin >> H >> W;
	vector<string> S(H);
	for(int i = 0; i < H; i++) cin >> S[i];
	vector< vector< vector<int> > > cnt(H, vector< vector<int> >(W, vector<int>(H+W, 0)));
	cat ans = 0;
	for(int k = 0; k < 2; k++) {
		for(int l = 0; l < 2; l++) {
			for(int i = 1; i < H; i++) for(int j = 1; j < W; j++) for(int d = 2; d <= i+j; d++) {
				cnt[i][j][d] = cnt[i][j-1][d-1];
				if(i-d+1 >= 0) cnt[i][j][d] += (S[i-d+1][j-1] == '#');
			}
			for(int i = 0; i < H; i++) for(int j = 0; j < W; j++) if(S[i][j] == '#')
				for(int d = 1; d <= min(i, W-1-j); d++) if(S[i-d][j+d] == '#') ans += cnt[i-d][j][d];
			reverse(begin(S), end(S));
		}
		for(int i = 0; i < H; i++) reverse(begin(S[i]), end(S[i]));
	}
	for(int i = 0; i < H; i++) for(int j = 0; j < W; j++) if(S[i][j] == '#') {
		for(int k = 1; k <= j/2; k++) if(S[i][j-2*k] == '#') {
			if(k <= i && S[i-k][j-k] == '#') ans++;
			if(i+k < H && S[i+k][j-k] == '#') ans++;
		}
		for(int k = 1; k <= i/2; k++) if(S[i-2*k][j] == '#') {
			if(k <= j && S[i-k][j-k] == '#') ans++;
			if(j+k < W && S[i-k][j+k] == '#') ans++;
		}
	}
	cout << ans << "\n";
	return 0;
}

// look at my code
// my code is amazing
