#include <bits/stdc++.h>
int main(void) {
  long long b, g, n;
  std::cin >> b >> g >> n;
  long long ans = 0;
  for (long long i = 0; i <= n; ++i) {
    long long ot = n - i;
    ans += ot <= g && i <= b;
  }
  std::cout << ans << "\n";
  return 0;
}
