#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int main() {
  int x;
  for (int i = 0; i < 3; i++) cin >> x, a.push_back(x);
  sort(a.begin(), a.end());
  int dif = a[2] - a[1] - a[0] + 1;
  printf("%d\n", max(dif, 0));
  return 0;
}
