#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int a, b, c, temp;
  cin >> a >> b >> c;
  temp = max(a, max(b, c));
  if (temp >= ((a + b + c) - temp))
    cout << temp + 1 - ((a + b + c) - temp);
  else
    cout << 0;
}
