#include <bits/stdc++.h>
using namespace std;
bool can(int a, int b, int c) {
  if (a + b > c && b + c > a && c + a > b) return true;
  return false;
}
int s(int a, int b, int n) { return n - a - b; }
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  if (can(a, b, c)) {
    cout << 0 << endl;
    return 0;
  } else {
    if (c > a && c > b) {
      cout << s(a, b, c + 1) << endl;
    } else if (a > b && a > c) {
      cout << s(b, c, a + 1) << endl;
    } else {
      cout << s(a, c, b + 1) << endl;
    }
  }
}
