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 <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int in() { int x; scanf("%d", &x); return x; }
ll lin() { ll x; scanf("%lld", &x); return x; }

const int N = 610;
int a[N][N], sr[N][N], sc[N][N];

bool isin(int i, int j){
    return i >= 0 && j >= 0 && i < N && j < N;
}

bool exist(int i, int j){
    return isin(i, j) && a[i][j];
}

int main() {
    int h, w;
    cin >> h >> w;
    REP(i,h){
        string s;
        cin >> s;
        REP(j,w){
            a[i+j][i-j+300] = (s[j] == '#');
        }
    }

    REP(i,N) REP(j,N-1) sr[i][j+1] = sr[i][j] + a[i][j];
    REP(j,N) REP(i,N-1) sc[i+1][j] = sc[i][j] + a[i][j];

    ll ans = 0, ans2 = 0;
    REP(i,N) REP(j,N){
        if (!a[i][j]) continue;
        FOR(d,1,N){
            ll tmp = 0;
            if (exist(i - d, j)){
                if (j + d < N) tmp += sc[i][j+d] - sc[i-d+1][j+d];
                if (j - d >= 0) tmp += sc[i][j-d] - sc[i-d+1][j-d];
            }
            if (exist(i + d, j)){
                if (j + d < N) tmp += sc[i+d][j+d] - sc[i+1][j+d];
                if (j - d >= 0) tmp += sc[i+d][j-d] - sc[i+1][j-d];
            }
            if (exist(i, j - d)){
                if (i + d < N) tmp += sr[i+d][j] - sr[i+d][j-d+1];
                if (i - d >= 0) tmp += sr[i-d][j] - sr[i-d][j-d+1];
            }
            if (exist(i, j + d)){
                if (i + d < N) tmp += sr[i+d][j+d] - sr[i+d][j+1];
                if (i - d >= 0) tmp += sr[i-d][j+d] - sr[i-d][j+1];
            }
            ans2 += (exist(i - d, j) + exist(i + d, j)) * (exist(i, j - d) + exist(i, j + d));
            ans += tmp;
        }
    }
    cout << ans / 2 + ans2 << endl;

    return 0;
}
