#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int leg[3];
  int m, n;
  int x;
  for (int i = 0; i < 3; i++) {
    cin >> leg[i];
  }
  m = 0;
  n = 0;
  for (int i = 0; i < 3; i++) {
    if (leg[i] >= m) {
      n = i;
      m = leg[i];
    }
  }
  m = 0;
  for (int i = 0; i < 3; i++) {
    if (i == n) {
      continue;
    }
    m += leg[i];
  }
  x = 0;
  if (leg[n] >= m) {
    x = leg[n] - m + 1;
  }
  cout << x;
  return 0;
}
