#include <bits/stdc++.h>
using namespace std;
int main() {
  short n, a, b, c = 0;
  cin >> n >> a >> b;
  for (short i = 0; i <= b; i++) {
    if (i + n - 1 - a - b >= 0) c++;
  }
  cout << c << "\n";
  return 0;
}
