#include <bits/stdc++.h>
using namespace std;
int Max(int x, int y, int z) {
  int max;
  if (x >= y)
    max = x;
  else
    max = y;
  if (max >= z)
    return max;
  else
    return z;
}
int Min(int x, int y, int z) {
  int min;
  if (x <= y)
    min = x;
  else
    min = y;
  if (min <= z)
    return min;
  else
    return z;
}
int main() {
  int a, b, c, count, sr;
  cin >> a >> b >> c;
  sr = a + b + c - Max(a, b, c) - Min(a, b, c);
  if ((a + b > c) && (a + c > b) && (b + c > a)) {
    cout << 0;
    return 0;
  } else {
    count = Max(a, b, c) + 1 - (Min(a, b, c) + sr);
    cout << count;
  }
  return 0;
}
