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>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr ll MOD = 1e9 + 7;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }
ll c[601][601], c1[601][601], c2[601][601];
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int h, w;
    cin >> h >> w;
    for (int i = 0; i < h; i++) {
        string s;
        cin >> s;
        for (int j = 0; j < w; j++) {
            if (s[j] == '#') {
                c[i + j][i - j + 300]++;
            }
        }
    }
    for (int i = 0; i <= 600; i++) {
        c1[i][0] = c[i][0];
        for (int j = 1; j <= 600; j++) {
            c1[i][j] = c1[i][j - 1] + c[i][j];
        }
    }
    for (int i = 0; i <= 600; i++) {
        c2[0][i] = c[0][i];
        for (int j = 1; j <= 600; j++) {
            c2[j][i] = c2[j - 1][i] + c[j][i];
        }
    }
    ll res1 = 0, res2 = 0;
    for (int i = 0; i <= 600; i++) {
        for (int j = 0; j <= 600; j++) {
            for (int k = j + 1; k <= 600; k++) {
                if (c[i][j] && c[i][k]) {
                    if (i + k - j <= 600) {
                        res1 += c[i + k - j][k] + c[i + k - j][j];
                        res2 += c1[i + k - j][k - 1] - c1[i + k - j][j];
                    }
                    if (i - (k - j) >= 0) {
                        res1 += c[i - (k - j)][k] + c[i - (k - j)][j];
                        res2 += c1[i - (k - j)][k - 1] - c1[i - (k - j)][j];
                    }
                }
                if (c[k][i] && c[j][i]) {
                    if (i + k - j <= 600) {
                        res1 += c[k][i + k - j] + c[j][i + k - j];
                        res2 += c2[k - 1][i + k - j] - c2[j][i + k - j];
                    }
                    if (i - (k - j) >= 0) {
                        res1 += c[k][i - (k - j)] + c[j][i - (k - j)];
                        res2 += c2[k - 1][i - (k - j)] - c2[j][i - (k - j)];
                    }
                }
            }
        }
    }
    cout << res1 / 2LL + res2 << endl;
}