#include <bits/stdc++.h>
using namespace std;
const int N = 1001;
int n, a, b;
bool read() {
  if (!(cin >> n >> a >> b)) {
    return false;
  }
  return true;
}
void solve() {
  if (a + b >= n) {
    cout << (n - a) << endl;
  } else {
    cout << (b + 1) << endl;
  }
}
int main(int argc, char* argv[]) {
  while (read()) {
    solve();
  }
  return 0;
}
