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