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 db(x) cout<<#x<<"="<<(x)<<" "
#define el cout<<endl
using namespace std;

typedef long long ll;
const int MXN = 610;
const int MOD = 998244353, inv2 = MOD - MOD / 2;

int n, m;
char str[MXN][MXN];
int g[MXN][MXN] = {};
long long ans;

void solve(int n, int m) {
    //db(g[3][3]), el;
    for (int t = 0; t < n + m - 1; ++t) {
        int o = 0;
        for (int i = t; i >= 0; --i) {
            o += g[i][t - i];
            //db(i), db(o), el;
            int oo = o;
            for (int j = 0; j <= t - i; j++) {
                oo -= g[t - j][j];
                //db(oo), el;
                if (j + j + i - t >= 0)
                    if (i + i + j - t >= 0)
                        if (g[i][j + j + i - t] && g[i + i + j - t][j])
                            ans += oo;
            }
        }
    }
    memset(g, 0, sizeof(g));
}
int main() {
    scanf("%d %d\n", &n, &m);
    for (int i = 0; i < n; ++i)
        scanf("%s\n", str[i]);
    //n = m = max(n, m);
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j) {
            g[i][j] = str[i][j] == '#';
        }
    solve(n, m);
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j)
            g[j][n - i - 1] = str[i][j] == '#';
    solve(m, n);
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j)
            g[n - i - 1][m - j - 1] = str[i][j] == '#';
    solve(n, m);
    for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j)
            g[m - j - 1][i] = str[i][j] == '#';
    solve(m, n);
    cout << ans << endl;
    return 0;
}