#include <bits/stdc++.h>
using namespace std;
int main() {
  bool tick = false;
  int i, a, b, c, t, time = 0, mini = 100000;
  cin >> a >> b >> c;
  int tri[3] = {a, b, c};
  if (a + b > c && a + c > b && b + c > a) {
    tick = true;
  }
  while (tick == false) {
    mini = 10000;
    for (i = 0; i < 3; i++) {
      if (tri[i] < mini) {
        mini = tri[i];
        t = i;
      }
    }
    if (t == 0) {
      a++;
    } else if (t == 1) {
      b++;
    } else {
      c++;
    }
    time++;
    if (a + b > c && a + c > b && b + c > a) {
      tick = true;
    }
  }
  cout << time;
}
