#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, s = 0, d = 0, p;
  cin >> a >> b >> c;
  if (a > b && a > c) {
    s = a;
    d = b + c;
  } else if (b > a && b > c) {
    s = b;
    d = a + c;
  } else if (c > a && c > b) {
    s = c;
    d = a + b;
  } else {
    s = 1;
    d = 3;
  }
  p = (s - d) + 1;
  if (p >= 0) {
    cout << p;
  } else {
    cout << 0;
  }
}
