#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n >> a;
  if (a % 2 == 1) {
    cout << 1 + (a - 1) / 2;
  } else {
    int ans = 1, pos = n;
    while (true) {
      if (pos == a) break;
      pos -= 2;
      ans += 1;
    }
    cout << ans;
  }
  return 0;
}
