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