#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0, fl = 1;
  while (!isdigit(c)) {
    if (c == '-') fl = -1;
    c = getchar();
  }
  do {
    x = x * 10 + (c ^ 48);
    c = getchar();
  } while (isdigit(c));
  return x * fl;
}
int a[4];
int main() {
  for (int i = 1; i <= 3; ++i) a[i] = read();
  sort(a + 1, a + 4);
  if (a[1] + a[2] > a[3])
    printf("0\n");
  else
    printf("%d\n", a[3] + 1 - a[1] - a[2]);
  return 0;
}
