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