output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      H
      W
attempt: H, W = map(int, input().split())
  S = [input() for i in range(H)]
  
  
  b_list = []
  for row in S:
      tmp_raw = []
      for j, t in enumerate(row):
          if t == "#":
              tmp_raw.append(j)
      b_list.append(tmp_raw)
  tmp = -1
  res = {}
  raw_before = []
  for i, raw in enumerate(b_list):
      res[i] = {}
      for j in raw:
          res[i][j] = []
          if not ((j - 1) in raw or j == 0):
              res[i][j].append((i, j - 1))
          if not ((j + 1) in raw or j == W - 1):
              res[i][j].append((i, j + 1))
          if not (i == 0 or j in raw_before):
              res[i][j].append((i - 1, j))
          if not (i == H - 1):
              if not (j in b_list[i + 1]):
                  res[i][j].append((i + 1, j))
      raw_before = raw
  
  
  before = 0
  for i, raw in enumerate(b_list):
      for j in raw:
          before += len(res[i][j])
  while True:
      for i, raw in enumerate(b_list):
          for j in raw:
              try:
                  if S[i - 1][j] == "." or S[i][j - 1] == ".":
                      res[i][j] += res[i - 1][j - 1]
              except:
                  pass
              try:
                  if S[i + 1][j] == "." or S[i][j - 1] == ".":
                      res[i][j] += res[i + 1][j - 1]
              except:
                  pass
              try:
                  if S[i - 1][j] == "." or S[i][j + 1] == ".":
                      res[i][j] += res[i - 1][j + 1]
              except:
                  pass
              try:
                  if S[i + 1][j] == "." or S[i][j + 1] == ".":
                      res[i][j] += res[i + 1][j + 1]
              except:
                  pass
      before = result
      for i, raw in enumerate(b_list):
          for j in raw:
              res[i][j] = list(set(res[i][j]))
      result = 0
      for i, raw in enumerate(b_list):
          for j in raw:
              result += len(res[i][j])
      if before == result:
          break
  print(result)
  
problem_description: Statement
  
  It has been decided that a programming contest sponsored by company A will be
  held, so we will post the notice on a bulletin board.
  
  The bulletin board is in the form of a grid with N rows and N columns, and the
  notice will occupy a rectangular region with H rows and W columns.
  
  How many ways are there to choose where to put the notice so that it
  completely covers exactly HW squares?
samples: [{"input": "3\n    2\n    3", "output": "2\n    \n\nThere are two ways to put the notice, as follows:\n\n    \n    \n    ###   ...\n    ###   ###\n    ...   ###\n    \n\nHere, `#` represents a square covered by the notice, and `.` represents a\nsquare not covered.\n\n* * *"}, {"input": "100\n    1\n    1", "output": "10000\n    \n\n* * *"}, {"input": "5\n    4\n    2", "output": "8"}]