#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
int main() {
  std::ios_base::sync_with_stdio(false);
  int arr[3];
  std::cin >> arr[0] >> arr[1] >> arr[2];
  std::sort(arr, arr + 3);
  int sol = 0;
  while (arr[2] >= arr[0] + arr[1]) {
    arr[1]++;
    sol++;
  }
  std::cout << sol;
  return 0;
}
