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