#include <bits/stdc++.h>
using namespace std;
int tt = 0;
void solve() {
  int boy, girl, total;
  cin >> boy >> girl >> total;
  int cnt = 0;
  for (int i = 0; i <= boy; i++)
    for (int j = 0; j <= girl; j++)
      if (i + j == total) cnt++;
  cout << cnt << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  { solve(); }
  return 0;
}
