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"
#include<cassert>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
const long long inf = 1ll << 62;
typedef pair<int, int> P;
typedef pair<P, int> PP;
int sum[605][605];
int rwa[605][605];

int query(int ai, int aj, int bi, int bj) {//ai+1~ai
	return rwa[bi][bj] + rwa[ai][aj] - rwa[ai][bj] - rwa[bi][aj];
}

signed main() {
	int h, w; cin >> h >> w;
	rep(i, h) {
		string s; cin >> s;
		rep(j, w) {
			if (s[j] == '#') {
				sum[i + j][i - j+w]++;
			}
		}
	}
	rep(i, h + w) {
		rep(j, h + w) {
			rwa[i + 1][j + 1] += sum[i][j];
		}
	}
	rep(i, 603)rep(j, 603)rwa[i + 1][j] += rwa[i][j];
	rep(i, 603)rep(j, 603)rwa[i][j + 1] += rwa[i][j];

	int cnt = 0;
	rep(i, h + w) {
		vector<int>V;
		rep(j, h + w) {
			if (sum[i][j])V.push_back(j);
		}
		rep(j, V.size()) {
			for (int k = j + 1; k < V.size(); k++) {
				int l = V[j], r = V[k];
				if (i - r + l >= 0)cnt += query(i - r + l, l, i - r + l + 1, r + 1);
				if (i + r - l <= h + w)cnt += query(i + r - l, l, i + r - l + 1, r + 1);
			}
		}
	}

	rep(j, h + w) {
		vector<int>V;
		rep(i, h + w) {
			if (sum[i][j])V.push_back(i);
		}
		rep(i, V.size()) {
			for (int k = i + 1; k < V.size(); k++) {
				int u = V[i], d = V[k];
				if (j - d + u >= 0)cnt += query(u+1, j - d + u, d, j - d + u + 1);
				if (j + d - u <= h + w)cnt += query(u + 1, j + d - u, d, j + d - u + 1);
			}
		}
	}
	cout <<cnt << endl;
}
