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 <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>

using namespace std;

struct BoolName : numpunct<char> {
  string t, f;
  BoolName (string t = "Yes", string f = "No") : t(t), f(f) {}
  string do_truename() const {return t;}
  string do_falsename() const {return f;}
};

struct Initializer {
  Initializer() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(15) << boolalpha;
    cout.imbue(locale(cout.getloc(), new BoolName));
  }
} initializer;

template<typename T> istream& operator>>(istream &s, vector<T> &v) {
  for (T &t : v) s >> t;
  return s;
}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {
  for (const T &t : v) s << t << endl;
  return s;
}

int main() {
  int h, w;
  cin >> h >> w;
  vector<string> s(h);
  cin >> s;
  vector<vector<bool>> v(600, vector<bool>(600));
  for (int i = 0; i < h; ++i) {
    for (int j = 0; j < w; ++j) {
      if (s[i][j] == '#') v[i - j + w][i + j] = true;
    }
  }
  int64_t res = 0;
  for (int d = 2; d < 600; d += 2) {
    for (int i = 0; i < 600; ++i) {
      int c = 0;
      for (int j = 0; j < d; ++j) {
        if (i + d < 600 && v[i + d][j]) ++c;
        if (i - d >= 0 && v[i - d][j]) ++c;
      }
      for (int j = 0; j + d < 600; ++j) {
        if (i + d < 600 && v[i + d][j + d]) ++c;
        if (i - d >= 0 && v[i - d][j + d]) ++c;
        if (v[i][j] && v[i][j + d]) {
          res += c;
        }
        if (i + d < 600 && v[i + d][j]) --c;
        if (i - d >= 0 && v[i - d][j]) --c;
      }
    }
  }
  auto u = v;
  for (int i = 0; i < 600; ++i) {
    for (int j = 0; j < 600; ++j) {
      v[i][j] = u[j][i];
    }
  }
  for (int d = 2; d < 600; d += 2) {
    for (int i = 0; i < 600; ++i) {
      int c = 0;
      for (int j = 1; j < d - 1; ++j) {
        if (i + d < 600 && v[i + d][j]) ++c;
        if (i - d >= 0 && v[i - d][j]) ++c;
      }
      for (int j = 0; j + d < 600; ++j) {
        if (i + d < 600 && v[i + d][j + d - 1]) ++c;
        if (i - d >= 0 && v[i - d][j + d - 1]) ++c;
        if (v[i][j] && v[i][j + d]) {
          res += c;
        }
        if (i + d < 600 && v[i + d][j + 1]) --c;
        if (i - d >= 0 && v[i - d][j + 1]) --c;
      }
    }
  }
  cout << res << endl;
}

