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