#include <bits/stdc++.h>
using namespace std;
signed main() {
  vector<unsigned> a(3);
  for (unsigned& x : a) cin >> x;
  sort(a.begin(), a.end());
  if (a[2] < a[0] + a[1]) {
    cout << 0;
    exit(0);
  }
  cout << min(a[2] - (a[1] + a[0]),
              min(a[1] - (a[2] - a[0]), a[0] - (a[2] - a[0]))) +
              1;
}
