#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long m, mi, mid;
  long long v[3];
  v[0] = a;
  v[1] = b;
  v[2] = c;
  sort(v, v + 3);
  a = v[2];
  b = v[0];
  c = v[1];
  if (a - b < c) {
    cout << "0";
  } else {
    m = a - b - c + 1;
    cout << m;
  }
  return 0;
}
