#include <bits/stdc++.h>
int main(void) {
  int numberOfPeople, front, back;
  scanf("%d %d %d", &numberOfPeople, &front, &back);
  if (numberOfPeople > front + back + 1) front = numberOfPeople - 1 - back;
  printf("%d", numberOfPeople - front);
}
