#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e3 + 5;
const long long mod = 1e9 + 7;
const long long p = 31;
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  long long n, a;
  cin >> n >> a;
  if (a & 1) {
    long long j = 1;
    for (long long i = 1; i != a; i += 2) {
      j++;
    }
    cout << j;
  } else {
    long long j = 1;
    for (long long i = n; i != a; i -= 2) {
      j++;
    }
    cout << j;
  }
}
int32_t main() {
  c_p_c();
  solve();
}
