#include <bits/stdc++.h>
int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  int num1 = a + 1, num2 = n - b;
  int number;
  if (num1 < num2)
    number = num2;
  else
    number = num1;
  printf("%d", n - number + 1);
}
