#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  int a[3];
  for (int i = 0; i < 3; i++) cin >> a[i];
  sort(a, a + 3);
  if (a[0] + a[1] > a[2]) return cout << 0 << endl, 0;
  int r = a[2] - a[1];
  cout << min(r + 1, r - a[0] + 1) << endl;
}
