#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  if (a + b >= n) {
    n = n - a;
    cout << n << endl;
  } else {
    n = b + 1;
    cout << n << endl;
  }
}
