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