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;

typedef long long ll;

const int MN = 333;

int H, W;
char G[MN][MN], T[MN][MN];
int psum[MN << 1][MN][MN];
ll ans, sub;

void solve() {
    for(int i = 0; i < H + W; i++) for(int j = 0; j < MN; j++) memset(psum[i][j], 0, sizeof(psum[i][j]));
    for(int i = 0; i < H + W; i++) {
        for(int y = 0; y < H; y++) {
            int x = i - y;
            if(x < 0 || W <= x) continue;
            if(G[y][x] != '#') continue;

            for(int d = 1; d < MN; d++) {
                int ny = y - d;
                int nx = x + d;
                if(ny < 0 || W <= nx) break;
                if(G[ny][nx] != '#') continue;
                psum[i][d][y]++;
            }
        }
    }
    for(int i = 0; i < H + W; i++) for(int j = 0; j < MN; j++) for(int k = 1; k < MN; k++) psum[i][j][k] += psum[i][j][k - 1];
    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            if(G[i][j] != '#') continue;

            for(int k = 1; k < MN; k++) {
                if(i + j - 2 * k < 0) break;
                ans += psum[i + j - 2 * k][k][i];
                if(i - k > 0) ans -= psum[i + j - 2 * k][k][ i - k - 1 ];
            }
        }
    }

    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            if(G[i][j] != '#') continue;

            for(int k = 1; k <= max(H, W); k++) {
                if(i - k < 0 || H <= i + k || W <= j + k) break;
                if(G[i - k][j + k] == '#' && G[i + k][j + k] == '#') sub++;
            }
        }
    }
}

void Rotate() {
    for(int i = 0; i < H; i++) for(int j = 0; j < W; j++) T[j][H - 1 - i] = G[i][j];
    for(int i = 0; i < W; i++) for(int j = 0; j < H; j++) G[i][j] = T[i][j];
    swap(H, W);
}

int main() {
    scanf("%d %d", &H, &W);

    for(int i = 0; i < H; i++) {
        scanf("\n");
        for(int j = 0; j < W; j++) {
            scanf("%c", &G[i][j]);
        }
    }
    for(int i = 0; i < 4; i++) {
        solve();
        Rotate();
    }

    printf("%lld", ans - sub);
}
