Petr stands in line of n people, but he doesn't know exactly which position he occupies. He can say that there are no less than a people standing in front of him and no more than b people standing behind him. Find the number of different positions Petr can occupy.

Input

The only line contains three integers n, a and b (0 ≤ a, b < n ≤ 100).

Output

Print the single number — the number of the sought positions.

Examples

Input

3 1 1


Output

2


Input

5 2 3


Output

3

Note

The possible positions in the first sample are: 2 and 3 (if we number the positions starting with 1).

In the second sample they are 3, 4 and 5.
#include <bits/stdc++.h>
using namespace std;
long stoi(string s) {
  long n = 0;
  for (int i = 0; i < s.size(); i++) n = n * 10 + s[i] - 48;
  return n;
}
string itos(long n) {
  string s = "";
  while (n) {
    s += char(n % 10 + 48);
    n = n / 10;
  }
  reverse(s.begin(), s.end());
  return s;
}
long long year(long long n) {
  bool ar[100100] = {0};
  while (n) {
    if (ar[n % 10] != 0) {
      return false;
    }
    ar[n % 10] = 1;
    n /= 10;
  }
  return true;
}
int main() {
  string s, s1 = "YES", s2 = "NO", ss, s4, sss;
  long n, m = 0, nn, c = 0, cc = 0, ccc = 0, cccc = 0, ccccc = 0, mm,
          mx = -(1LL << 29), mn = (1LL << 29);
  long ar[1LL << 17] = {0}, ar1[1LL << 17] = {0};
  long arr[100][100];
  memset(arr, 0, sizeof(arr));
  set<string> string;
  vector<long> v;
  long c1, c2, c3, c4;
  c1 = c2 = c3 = c4 = 0;
  long f = 0;
  long a, b;
  cin >> a >> b >> n;
  for (int i = 1; i <= a; i++)
    if (i - 1 >= b and a - i <= n) c++;
  cout << c;
  return 0;
}
