#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0);
  int b, g, n;
  cin >> b >> g >> n;
  int i = 0, counter = 0;
  for (int j = n; j >= 0; --j) {
    if (!(i > b || j > g)) counter++;
    i++;
  }
  cout << counter << '\n';
  return 0;
}
