#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
void check_time() {}
const int res = 1e5 + 5;
const long long int mod = 1e9 + 7;
int main() {
  int a, b, c, maxi = 1e9;
  scanf("%d %d %d", &a, &b, &c);
  if (a + b > c and a + c > b and b + c > a) {
    deb("0");
    return 0;
  }
  if (a + b <= c) {
    maxi = min(maxi, c - a - b + 1);
  }
  if (a + c <= b) {
    maxi = min(maxi, b - a - c + 1);
  }
  if (b + c <= a) {
    maxi = min(maxi, a - c - b + 1);
  }
  deb(maxi);
  return 0;
}
