output_description: Print the number of times Takahashi will hear his favorite sound.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B C
attempt: n, m = map(int, input().split())
  bridge = [[] for i in range(m)]
  iland = [[i + 1] for i in range(n)]
  for i in range(m):
      bridge[i] = list(map(int, input().split()))
  ans = [0 for i in range(m + 1)]
  ans[0] = int((n - 1) * n / 2)
  k = 1
  for i in reversed(bridge):
      ans[k] = ans[k - 1]
      for j in range(len(iland)):
          if i[0] in iland[j]:
              temp = j
              break
      for j in range(len(iland)):
          if i[1] in iland[j]:
              if temp != j:
                  ans[k] = ans[k - 1] - len(iland[j]) * len(iland[temp])
                  iland[temp].extend(iland[j])
                  del iland[j]
                  break
      if ans[k] == 0:
          ans[k:] = [0 for l in range(m - k)]
          break
      k += 1
  for i in range(m):
      print(ans[m - 1 - i])
  
problem_description: Statement
  
  Takahashi likes the sound when he buys a drink from a vending machine.
  
  That sound can be heard by spending A yen (the currency of Japan) each time.
  
  Takahashi has B yen. He will hear the sound as many times as he can with that
  money, but at most C times, as he would be satisfied at that time.
  
  How many times will he hear the sound?
samples: [{"input": "2 11 4", "output": "4\n    \n\nSince he has not less than 8 yen, he will hear the sound four times and be\nsatisfied.\n\n* * *"}, {"input": "3 9 5", "output": "3\n    \n\nHe may not be able to be satisfied.\n\n* * *"}, {"input": "100 1 10", "output": "0"}]