output_description: Print the amount of change as an integer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: import numpy as np
  import itertools
  
  h = int(input())
  w = int(input())
  k = int(input())
  s = [list(input()) for i in range(h)]
  data = np.zeros(h * w).reshape(h, w)
  for i in range(h):
      for j in range(w):
          if s[i][j] == "#":
              data[i][j] = 1
  
  ans = 0
  ## 塗らない場合
  if np.sum(data == 1) == k:
      ans = 1
  ## すべて塗った場合
  if k == 0:
      ans = 1
  
  a = list()
  b = list()
  for i in range(1, h):
      a += list(itertools.combinations(range(h), i))
  for i in range(1, w):
      b += list(itertools.combinations(range(w), i))
  
  for i in a:
      for j in b:
          temp = data.copy()
          temp[i, :] = 2
          temp[:, j] = 2
          if np.sum(temp == 1) == k:
              ans += 1
  
  for i in a:
      temp = data.copy()
      temp[i, :] = 2
      if np.sum(temp == 1) == k:
          ans += 1
  
  for j in b:
      temp = data.copy()
      temp[:, j] = 2
      if np.sum(temp == 1) == k:
          ans += 1
  
  print(ans)
  
problem_description: Statement
  
  We will buy a product for N yen (the currency of Japan) at a shop.
  
  If we use only 1000-yen bills to pay the price, how much change will we
  receive?
  
  Assume we use the minimum number of bills required.
samples: [{"input": "1900", "output": "100\n    \n\nWe will use two 1000-yen bills to pay the price and receive 100 yen in change.\n\n* * *"}, {"input": "3000", "output": "0\n    \n\nWe can pay the exact price."}]