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