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>
using namespace std;
using Int = long long;
int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(9), 0);
//int SEGV = getenv("D") || (exit(system("D= SEGFAULT_SIGNALS=all catchsegv ./prog.exe") >> 8), 0);
pair<int, int> f(int H, int W, const vector<string>& S) {
    vector<vector<int>> sum(H + W - 1, vector<int>(W + 1));
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            sum[i + j][j + 1] += S[i][j] == '#';
        }
    }
    for (int i = 0; i < H + W - 1; i++) {
        for (int j = 0; j < W; j++) {
            sum[i][j + 1] += sum[i][j];
        }
    }
    int a = 0, b = 0;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (S[i][j] != '#') continue;
            for (int n = 1; i - n >= 0 && j + n < W; n++) {
                if (S[i - n][j + n] != '#') continue;
                if (i - 2*n >= 0 && S[i - 2*n][j] == '#') a++;
                if (j - n >= 0 && S[i - n][j - n] == '#') a++;
                if (i + j - 2*n >= 0) {
                    int x = max(j - n + 1, 0);
                    int y = j - 1;
                    if (y >= 0) {
                        b += sum[i + j - 2*n][y + 1] - sum[i + j - 2*n][x];
                    }
                }
            }
        }
    }
    return {a, b};
}
void rotate(int &H, int &W, vector<string>& S) {
    vector<string> ans(W, string(H, '@'));
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            ans[j][H - 1 - i] = S[i][j];
        }
    }
    swap(S, ans), swap(H, W);
}
int main() {
    int H, W; cin >> H >> W;
    vector<string> S(H); for (auto &s : S) cin >> s;
    int a = 0, b = 0;
    for (int i = 0; i < 4; i++) {
        auto p = f(H, W, S);
        a += p.first, b += p.second;
        rotate(H, W, S);
    }
    cout << a / 2 + b << endl;
    return 0;
}
