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
#ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>

#define FASTIO
#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)

#ifdef FASTIO
#define scanf abacaba
#define printf abacaba
#endif

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

using namespace std;


/*
ll pw(ll a, ll b) {
	ll ans = 1; while (b) {
		while (!(b & 1)) b >>= 1, a = (a * a) % MOD;
		ans = (ans * a) % MOD, --b;
	} return ans;
}
*/

const int MX = 610;

int n, m;
int a[MX][MX];
string tmps[310];
int sm[MX][MX];

int get(int x1, int y1, int x2, int y2) {
	x1 = max(x1, 0);
	y1 = max(y1, 0);
	x2 = min(x2, n);
	y2 = min(y2, n);
	if (x1 >= x2 || y1 >= y2)
		return 0;
	return sm[x2][y2] - sm[x2][y1] - sm[x1][y2] + sm[x1][y1];
}

int main() {
#ifdef FASTIO
	ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif
	cin >> n >> m;
	for (int i = 0; i < n; ++i)
		cin >> tmps[i];
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < m; ++j) {
			if (tmps[i][j] == '#')
				a[i - j + m][i + j] = 1;
		}
	n = m = n + m;
	for (int i = 1; i <= n; ++i)
		for (int j = 1; j <= n; ++j) {
			sm[i][j] = sm[i - 1][j] + sm[i][j - 1] - sm[i - 1][j - 1] + a[i - 1][j - 1];
		}
	ll ans = 0;
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j) {
			if (!a[i][j])
				continue;
			for (int k = j + 2; k < n; k += 2) {
				if (a[i][k]) {
					ans += get(i + (k - j), j, i + (k - j) + 1, k + 1);
					ans += get(i - (k - j), j, i - (k - j) + 1, k + 1);
				}
			}
			for (int k = i + 2; k < n; k += 2) {
				if (a[k][j]) {
					ans += get(i + 1, j + (k - i), k, j + (k - i) + 1);
					ans += get(i + 1, j - (k - i), k, j - (k - i) + 1);
				}
			}
		}
	cout << ans << "\n";
	return 0;
}


