#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, ans;
  cin >> a >> b >> c;
  x = max(a, max(b, c));
  if (x == a) {
    if (a - b - c < 0)
      ans = 0;
    else
      ans = (a + 1 - b - c);
  } else if (x == b) {
    if (b - a - c < 0)
      ans = 0;
    else
      ans = (b + 1 - a - c);
  } else if (x == c) {
    if (c - a - b < 0)
      ans = 0;
    else
      ans = (c + 1 - a - b);
  }
  cout << ans;
}
