#include <bits/stdc++.h>
using namespace std;
template <typename T>
T load() {
  T r;
  cin >> r;
  return r;
}
template <typename T>
vector<T> loadMany(int n) {
  vector<T> rs(n);
  generate(rs.begin(), rs.end(), &load<T>);
  return rs;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  auto ls = loadMany<int>(3);
  sort(ls.begin(), ls.end());
  auto answer = max(ls[2] - ls[1] - ls[0] + 1, 0);
  cout << answer << '\n';
}
