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