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: data = input().split()
  n = int(data[0])
  m = int(data[1])
  edge = []
  for i in range(m):
      tmp = []
      data = input().split()
      tmp.append(int(data[0]) - 1)
      tmp.append(int(data[1]) - 1)
      edge.append(tmp)
  
  grp = list(range(0, n))
  
  
  def group(num):
      if grp[num] == num:
          return num
      return group(grp[num])
  
  
  def merge(num1, num2):
      grp[num2] = grp[num1]
  
  
  res = []
  ans = [1] * n
  ben = int(n * (n - 1) / 2)
  edge.reverse()
  for e in edge:
      # print(e, ans, ben, grp)
      res.append(ben)
      g0 = group(e[0])
      g1 = group(e[1])
      if g0 != g1:
          ben -= ans[g0] * ans[g1]
          sum = ans[g0] + ans[g1]
          merge(g0, g1)
          ans[g0] = sum
          ans[g1] = sum
  
  res.reverse()
  for r in res:
      print(r)
  
  # print(int(n*(n-1)/2))
  
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"}]