305617: CF1064A. Make a triangle!
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Make a triangle!
题意翻译
## 题目描述 Masha有三根长度分别为a,b,c厘米的小棒。每一分钟,Masha可以选择一根小棒并将它的长度增加一厘米,但他不可以折断小棒。 现在他要你求出他最少需要多少时间使得这三根小棒可以构成一个三角形。 ## 输入格式 三个数,分别为a,b,c ## 输出格式 一个数,为Masha最少需要的时间题目描述
Masha has three sticks of length $ a $ , $ b $ and $ c $ centimeters respectively. In one minute Masha can pick one arbitrary stick and increase its length by one centimeter. She is not allowed to break sticks. What is the minimum number of minutes she needs to spend increasing the stick's length in order to be able to assemble a triangle of positive area. Sticks should be used as triangle's sides (one stick for one side) and their endpoints should be located at triangle's vertices.输入输出格式
输入格式
The only line contains tree integers $ a $ , $ b $ and $ c $ ( $ 1 \leq a, b, c \leq 100 $ ) — the lengths of sticks Masha possesses.
输出格式
Print a single integer — the minimum number of minutes that Masha needs to spend in order to be able to make the triangle of positive area from her sticks.
输入输出样例
输入样例 #1
3 4 5
输出样例 #1
0
输入样例 #2
2 5 3
输出样例 #2
1
输入样例 #3
100 10 10
输出样例 #3
81