#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int res = 0;
  if (a + b <= c) res += c - (a + b) + 1;
  if (a + c <= b) res += b - (a + c) + 1;
  if (b + c <= a) res += a - (b + c) + 1;
  cout << res;
  return 0;
}
