#include <bits/stdc++.h>
using namespace std;
template <typename... t>
void r(t&... x) {
  ((cin >> x), ...);
}
int fact(int n) {
  int sum = 1;
  while (n != 0) {
    sum = n * sum;
    n--;
  }
  return sum;
}
int main() {
  int n, a, b, s = 0;
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    if ((i >= a) && (n - i - 1 <= b)) s++;
  }
  cout << s;
  return 0;
}
