#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, p, r, ans, i, n, m, x, y, s;
  cin >> n >> m >> x;
  s = max(n, max(m, x));
  r = (n + m + x) - s;
  if (r > s)
    cout << 0 << endl;
  else
    cout << s - r + 1 << endl;
}
