output_description: Print the maximum possible difference in the number of balls received.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
attempt: n, k = input().split(" ")
  n, k = int(n), int(k)
  maxval = k - n
  minval = k / n
  print(maxval - minval)
  
problem_description: Statement
  
  Takahashi is distributing N balls to K persons.
  
  If each person has to receive at least one ball, what is the maximum possible
  difference in the number of balls received between the person with the most
  balls and the person with the fewest balls?
samples: [{"input": "3 2", "output": "1\n    \n\nThe only way to distribute three balls to two persons so that each of them\nreceives at least one ball is to give one ball to one person and give two\nballs to the other person.\n\nThus, the maximum possible difference in the number of balls received is 1.\n\n* * *"}, {"input": "3 1", "output": "0\n    \n\nWe have no choice but to give three balls to the only person, in which case\nthe difference in the number of balls received is 0.\n\n* * *"}, {"input": "8 5", "output": "3\n    \n\nFor example, if we give 1, 4, 1, 1, 1 balls to the five persons, the number of\nballs received between the person with the most balls and the person with the\nfewest balls would be 3, which is the maximum result."}]