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 copy
  
  H, W, K = map(int, input().split())
  L = [[x for x in input()] for i in range(H)]
  ans = 0
  for i in range(2**H):
      for j in range(2**W):
          C = copy.deepcopy(L)
          for k in range(H):
              if i >> k & 1:
                  C[k] = ["r"] * W
          for l in range(W):
              if j >> l & 1:
                  for m in range(H):
                      C[m][l] = "r"
          count = 0
          for p in range(H):
              for q in range(W):
                  if C[p][q] == "#":
                      count += 1
          if count == 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."}]