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