#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, c, ans = 0;
  cin >> a >> b >> c;
  if (c >= a && c >= b)
    ans = max(0, c + 1 - (a + b));
  else if (b >= a && b >= c)
    ans = max(0, b + 1 - (a + c));
  else if (a >= b && a >= c)
    ans = max(0, a + 1 - (b + c));
  cout << ans << endl;
  return 0;
}
