#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, g, n;
  cin >> b >> g >> n;
  int ans = 0;
  for (int i = 0; i < 302; ++i) {
    for (int j = 0; j < 302; ++j) {
      if (i + j == n && i <= b && j <= g) {
        ++ans;
      }
    }
  }
  cout << ans;
  return 0;
}
