#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, i, sum;
  while (~scanf("%d%d%d", &n, &a, &b)) {
    sum = 0;
    for (i = a + 1; i <= n; i++) {
      if (n - i <= b) {
        sum++;
      }
    }
    printf("%d\n", sum);
  }
  return 0;
}
