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