#include <bits/stdc++.h>
int main() {
  int a, b, c;
  std::cin >> a >> b >> c;
  int big, x, y;
  if (a > b && a > c) {
    big = a;
    x = b;
    y = c;
  } else if (b > a && b > c) {
    big = b;
    x = a;
    y = c;
  } else if (c > a && c > b) {
    big = c;
    x = b;
    y = a;
  }
  if (x + y > big)
    std::cout << 0;
  else {
    std::cout << big + 1 - x - y;
  }
}
