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 <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define show(x) cout << #x << " = " << (x) << endl;
using namespace std;
using ll = long long;
using pii = pair<int,int>;
vector<string>s;
int a[605][605];
int ruiseki[605][605];
int n;
ll ans;
void rot(){
    int temp[605][605];
    rep(i,n){
        rep(j,n){
            temp[i][j] = a[j][n-1-i];
        }
    }
    swap(temp,a);
}
void cal(){
    memset(ruiseki,0,sizeof(ruiseki));
    rep(i,n){
        ruiseki[i][0] = 0;
        rep(j,n){
            ruiseki[i][j+1] = ruiseki[i][j] + a[i][j];
        }
    }
    /*rep(i,n){
        rep(j,n+1){
            cout << ruiseki[i][j];
        }
        cout << endl;
    }*/
    rep(i,n){
        rep(j,n){
            if(a[i][j] == 0)continue;
            for(int k = j + 1; k < n; k++){
                if(a[i][k] == 0)continue;
                if(i+k-j<n){
                    ans += ruiseki[i+k-j][k]-ruiseki[i+k-j][j];
                }
            }
        }
    }
}
int main(){
    int h,w;
    cin >> h >> w;
    s.resize(h);
    rep(i,h)cin >> s[i];
    rep(i,h){
        rep(j,w){
            a[i+j][i-j+w-1] = (s[i][j] == '#' ? 1 : 0);
        }
    }
    n = h + w;
    /*rep(i,n){
        rep(j,n){
            cout << a[i][j];
        }
        cout << endl;
    }*/
    rep(i,4){
        cal();
        rot();
    }
    cout << ans << endl;
}