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;
const int mod = 1e9 + 7;
template <typename KeyType, typename ValueType>
std::pair<KeyType, ValueType> get_max(const std::map<KeyType, ValueType> &x) {
  using pairtype = std::pair<KeyType, ValueType>;
  return *std::max_element(x.begin(), x.end(),
                           [](const pairtype &p1, const pairtype &p2) {
                             return p1.second < p2.second;
                           });
}
vector<long long> inp_ll(int n) {
  vector<long long> v(n);
  for (long long &x : v) {
    cin >> x;
  }
  return v;
}
long long binpow(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  long long res = binpow(a, b / 2) % mod;
  if (b % 2) {
    return (res * res * a) % mod;
  } else {
    return (res * res) % mod;
  }
}
vector<int> inp_int(int n) {
  vector<int> v(n);
  for (int &x : v) {
    cin >> x;
  }
  return v;
}
void display_ll(vector<long long> v) {
  for (auto x : v) {
    cout << x << " ";
  }
}
void display_int(vector<long long> v) {
  for (auto x : v) {
    cout << x << " ";
  }
}
long long sum_ll(vector<long long> v) {
  return accumulate((v).begin(), (v).end(), 0ll);
}
int sum_int(vector<int> v) { return accumulate((v).begin(), (v).end(), 0); }
void solve() {
  int a, b, n;
  cin >> n >> a >> b;
  cout << (n - a > b ? b + 1 : n - a);
  return;
}
int main() { solve(); }
