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