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 <cstdio>
#include <cstring>
#include <vector>
#include <deque>
#include <queue>
#include <array>
#include <set>
#include <map>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <cassert>
#include <utility>
#include <functional>
#include <bitset>
#include <cstdint>

using namespace std;
using i64 = int64_t;
using i32 = int32_t;
template<class T, class U> void init_n(vector<T>& v, size_t n, U x) 
{ v = vector<T>(n, x); }
template<class T> void init_n(vector<T>& v, size_t n) { init_n(v, n, T()); }
template<class T> void read_n(vector<T>& v, size_t n, size_t o = 0) 
{ v = vector<T>(n+o); for (size_t i=o; i<n+o; ++i) cin >> v[i]; }
template<class T> void read_n(T a[], size_t n, size_t o = 0)
{ for (size_t i=o; i<n+o; ++i) cin >> a[i]; }
template<class T> T gabs(const T& x) { return max(x, -x); }
#define abs gabs

i64 h, w;
vector<string> s, ss;
i64 sum[301][601];
int main() {
  cin >> h >> w;
  read_n(s, h);
  i64 ans = 0;

  ss = s;
  i64 dup = 0;
  for (i64 dir = 0; dir < 2; ++dir) {
    for (i64 i = 0; i < h; ++i) {
      string p = string(i, ' '), q = string(h - i - 1, ' ');
      s[i] = p + s[i] + q;
    }

    for (i64 j = 0; j < s[0].size(); ++j) {
      for (i64 i = 1; i <= h; ++i) {
        sum[i][j] = sum[i - 1][j] + (s[i - 1][j] == '#' ? 1 : 0);
      }
    }

    for (i64 j = 0; j < s[0].size(); ++j) {
      for (i64 i = 0; i < h; ++i) {
        if (s[i][j] == '#') for (i64 k = i + 1; k < h; ++k) {
          if (s[k][j] == '#') {
            i64 l = j + 2 * (k - i), m = j - 2 * (k - i);
            if (l < s[0].size()) {
              ans += sum[min(h, k + (k - i + 1))][l] - sum[k][l];
              if (s[k][l] == '#') dup++;
              if (k + (k - i) < h && s[k + (k - i)][l] == '#') dup++;
            }
            if (m >= 0) {
              ans += sum[i + 1][m] - sum[max(i64(0), i - (k - i))][m];
              if (s[i][m] == '#') dup++;
              if (i - (k - i) >= 0 && s[i - (k - i)][m] == '#') dup++;
            }
          }
        }
      }
    }
    
    s = ss;
    for (auto& t : s) reverse(begin(t), end(t));
  }

  cout << ans - dup / 2 << '\n';
  return 0;
}
