#include <bits/stdc++.h>
using namespace std;
map<char, int> m;
map<char, int> m1;
int main() {
  long long int n = 0, d, i = 0, j = 0, l = 0, r = 0, a = 0, b = 0, c1, c2, p,
                b2, s1 = 0, t = 0, t1 = 0, y = 0, x = 0, s2 = 0, c = 0;
  char ch;
  cin >> a >> b >> c;
  vector<int> adj[100001];
  int s[3];
  s[0] = a;
  s[1] = b;
  s[2] = c;
  n = 3;
  sort(s, s + n);
  a = s[2];
  b = s[1];
  c = s[0];
  if (a >= (b + c)) {
    while (a >= b + c) {
      t++;
      c++;
    }
  }
  if (b >= a + c) {
    while (b >= a + c) {
      t++;
      c++;
    }
  }
  if (c >= b + a) {
    while (c >= b + a) {
      t++;
      b++;
    }
  }
  cout << t << endl;
  return 0;
}
