output_description: Print the smallest number of rounds after which the friends can get to play a
  match against each other.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N A B
attempt: s = input().split()
  k = int(s[0])
  a = int(s[1])
  b = int(s[2])
  n = int(max(a, b))
  m = int(min(a, b))
  res = n - m
  resp = n + m
  if res % 2 == 0:
      print(int(n / 2 - m / 2))
  elif k - n > m - 1:
      print(k - n)
  elif m - 1 > k - n:
      print(k - m)
  elif m - 1 == k - n:
      print(n - resp // 2)
  
problem_description: Statement
  
  2N players are running a competitive table tennis training on N tables
  numbered from 1 to N.
  
  The training consists of _rounds_. In each round, the players form N pairs,
  one pair per table. In each pair, competitors play a match against each other.
  As a result, one of them wins and the other one loses.
  
  The winner of the match on table X plays on table X-1 in the next round,
  except for the winner of the match on table 1 who stays at table 1.
  
  Similarly, the loser of the match on table X plays on table X+1 in the next
  round, except for the loser of the match on table N who stays at table N.
  
  Two friends are playing their first round matches on distinct tables A and B.
  Let's assume that the friends are strong enough to win or lose any match at
  will. What is the smallest number of rounds after which the friends can get to
  play a match against each other?
samples: [{"input": "5 2 4", "output": "1\n    \n\nIf the first friend loses their match and the second friend wins their match,\nthey will both move to table 3 and play each other in the next round.\n\n* * *"}, {"input": "5 2 3", "output": "2\n    \n\nIf both friends win two matches in a row, they will both move to table 1."}]