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;

#define rep(i, N) for (int i = 0; i < (N); i++)

int f(vector<vector<bool>> a) {
    int H = a.size();
    int W = a[0].size();
    int ans = 0;
    rep(y, H) rep(x, W) {
        for (int d = 1; y + d < H && x - d >= 0 && x + d < W; d++) {
            if (a[y][x] && a[y + d][x - d] && a[y + d][x + d])
                ans++;
        }
    }
    vector<vector<int>> sum(H + 1, vector<int>(W + 1));
    rep(y, H) rep(x, W) sum[y + 1][x + 1] = sum[y][x] + a[y][x];
    rep(y1, H) rep(x1, W) {
        for (int d = 2; y1 + d < H && x1 + d < W; d++) {
            int y2 = y1 + d;
            int x2 = x1 + d;
            if (!a[y1][x1]) continue;
            if (!a[y2][x2]) continue;
            int y3 = y1 + d + 1;
            int x3 = x1 - d + 1;
            int y4 = y2 + d - 1;
            int x4 = x2 - d - 1;
            if (x3 < 0) {
                y3 -= x3;
                x3 = 0;
            }
            if (y4 > H - 1) {
                x4 -= y4 - (H - 1);
                y4 = H - 1;
            }
            if (0 <= y3 && y3 < H && 0 <= x4 && x4 < W)
                ans += sum[y4 + 1][x4 + 1] - sum[y3][x3];
        }
    }
    return ans;
}

vector<vector<bool>> rotate(vector<vector<bool>> a) {
    int H = a.size();
    int W = a[0].size();
    vector<vector<bool>> b(W, vector<bool>(H));
    rep(y, H) rep(x, W) b[x][H - 1 - y] = a[y][x];
    return b;
}

int main() {
    int H, W;
    cin >> H >> W;
    vector<vector<bool>> a(H, vector<bool>(W));
    rep(y, H) {
        string s; cin >> s;
        rep(x, W) a[y][x] = (s[x] == '#');
    }
    int ans = 0;
    rep(t, 4) {
        ans += f(a);
        a = rotate(a);
    }
    cout << ans << endl;
}
