#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e13 + 7;
void solve();
void sieve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed;
  cout << setprecision(10);
  long long int t = 1;
  while (t--) solve();
  return 0;
}
struct point {
  long long int x, y;
  point operator+(const point& a) {
    point res;
    res.x = x + a.x;
    res.y = y + a.y;
    return res;
  }
  point operator-(const point& a) {
    point res;
    res.x = x - a.x;
    res.y = y - a.y;
    return res;
  }
  long long int operator*(const point& a) {
    long long int res;
    res = x * a.y - y * a.x;
    return res;
  }
  long long int operator|(const point& a) {
    long long int res;
    res = x * a.x + y * a.y;
    return res;
  }
};
long long int orientation(point p1, point p2, point p3) {
  return (p1 - p2) * (p1 - p3);
}
void convexhull(vector<long long int>& v) { ; }
long double dist(point p1, point p2) {
  return sqrtl((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
void solve() {
  long long int a, b, c;
  cin >> a >> b >> c;
  cout << max(0LL, 1 + 2 * max(a, max(b, c)) - (a + b + c));
}
