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