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