시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 120 63 55 63.953%

문제

캥거루 세 마리가 사막에서 놀고 있다. 사막에는 수직선이 하나 있고, 캥거루는 서로 다른 한 좌표 위에 있다.

한 번 움직일 때, 바깥쪽의 두 캥거루 중 한 마리가 다른 두 캥거루 사이의 정수 좌표로 점프한다. 한 좌표 위에 있는 캥거루가 두 마리 이상일 수는 없다.

캥거루는 최대 몇 번 움직일 수 있을까?

입력

여러개의 테스트 케이스로 이루어져 있으며, 세 캥거루의 초기 위치 A, B, C가 주어진다. (0 < A < B < C < 100)

출력

각 테스트에 대해 캥거루가 최대 몇 번 움직일 수 있는지 출력한다.

예제 입력 1

2 3 5
3 5 9

예제 출력 1

1
3

힌트

W3sicHJvYmxlbV9pZCI6IjExMDM0IiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjZWE1XHVhYzcwXHViOGU4IFx1YzEzOFx1YjljOFx1YjlhYzIiLCJkZXNjcmlwdGlvbiI6IjxwPlx1Y2VhNVx1YWM3MFx1YjhlOCBcdWMxMzggXHViOWM4XHViOWFjXHVhYzAwIFx1YzBhY1x1YjljOVx1YzVkMFx1YzExYyBcdWIxODBcdWFjZTAgXHVjNzg4XHViMmU0LiBcdWMwYWNcdWI5YzlcdWM1ZDBcdWIyOTQgXHVjMjE4XHVjOWMxXHVjMTIwXHVjNzc0IFx1ZDU1OFx1YjA5OCBcdWM3ODhcdWFjZTAsIFx1Y2VhNVx1YWM3MFx1YjhlOFx1YjI5NCBcdWMxMWNcdWI4NWMgXHViMmU0XHViOTc4IFx1ZDU1YyBcdWM4OGNcdWQ0NWMgXHVjNzA0XHVjNWQwIFx1Yzc4OFx1YjJlNC48XC9wPlxyXG5cclxuPHA+XHVkNTVjIFx1YmM4OCBcdWM2YzBcdWM5YzFcdWM3N2MgXHViNTRjLCBcdWJjMTRcdWFlNjVcdWNhYmRcdWM3NTggXHViNDUwIFx1Y2VhNVx1YWM3MFx1Yjhl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