The main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with odd numbers are at one side of the street and are numbered from 1 to n - 1 in the order from the beginning of the street to the end (in the picture: from left to right). The houses with even numbers are at the other side of the street and are numbered from 2 to n in the order from the end of the street to its beginning (in the picture: from right to left). The corresponding houses with even and odd numbers are strictly opposite each other, that is, house 1 is opposite house n, house 3 is opposite house n - 2, house 5 is opposite house n - 4 and so on.

<image>

Vasya needs to get to house number a as quickly as possible. He starts driving from the beginning of the street and drives his car to house a. To get from the beginning of the street to houses number 1 and n, he spends exactly 1 second. He also spends exactly one second to drive the distance between two neighbouring houses. Vasya can park at any side of the road, so the distance between the beginning of the street at the houses that stand opposite one another should be considered the same.

Your task is: find the minimum time Vasya needs to reach house a.

Input

The first line of the input contains two integers, n and a (1 ≤ a ≤ n ≤ 100 000) — the number of houses on the street and the number of the house that Vasya needs to reach, correspondingly. It is guaranteed that number n is even.

Output

Print a single integer — the minimum time Vasya needs to get from the beginning of the street to house a.

Examples

Input

4 2


Output

2


Input

8 5


Output

3

Note

In the first sample there are only four houses on the street, two houses at each side. House 2 will be the last at Vasya's right.

The second sample corresponds to picture with n = 8. House 5 is the one before last at Vasya's left.
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
#pragma warning(disable : 4996)
#pragma hdrstop
namespace std {}
namespace Random {}
inline bool is_digit(const char ch) { return (ch >= '0' && ch <= '9'); }
class IO {
 public:
  constexpr static const std::size_t kBufferSize = 1 << 18;
  IO()
      : read_bytes_count_(0),
        read_buffer_offset_(0),
        current_char_(0),
        eof_(false) {
    static_assert(kBufferSize > 32,
                  "Size of a buffer must be greater than 32 due to comparison "
                  "in IO::flush() method.");
  }
  ~IO() { flush(); }
  IO(const IO&) = delete;
  IO& operator=(const IO&) = delete;
  IO(const IO&&) = delete;
  IO& operator=(const IO&&) = delete;
  inline void shift_char();
  inline int32_t next_int();
  IO& operator>>(int32_t& x);
  inline void flush();
  inline void new_line();
  inline void print_int(const int32_t x);
  IO& operator<<(const int32_t x);
  IO& operator<<(std::ostream& (*)(std::ostream&));

 private:
  using Buffer = std::array<char, kBufferSize>;
  Buffer read_buffer_;
  Buffer write_buffer_;
  std::size_t read_bytes_count_;
  std::size_t read_buffer_offset_;
  std::size_t write_buffer_offset_;
  bool eof_;
  char current_char_;
  inline void update_buffer();
  template <typename T>
  T read_number();
  template <typename T>
  void print_number(const T& value);
};
extern bool useFastIO;
extern std::istream* pin;
extern std::ostream* pout;
extern IO io;
inline int32_t next_int();
inline void new_line();
inline void print_int(const int32_t x);
using namespace std;
IO io;
void solve(istream& ins, ostream& out) {
  int a, n;
  io >> n >> a;
  if (!(a & 1)) {
    a = n - a;
  }
  int ans = a / 2 + 1;
  io << ans << endl;
}
extern class IO io;
bool useFastIO = false;
istream* pin;
ostream* pout;
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  istream& in = cin;
  useFastIO = true;
  ostream& out = cout;
  out << fixed << setprecision(16);
  pin = &in;
  pout = &out;
  solve(in, out);
  return 0;
}
template <typename T>
T IO::read_number() {
  bool is_negative = false;
  while (!eof_ && !is_digit(current_char_) &&
         (std::is_unsigned<T>() || current_char_ != '-')) {
    shift_char();
  }
  if (std::is_signed<T>() && current_char_ == '-') {
    is_negative = true;
    shift_char();
  }
  T result = 0;
  while (!eof_ && is_digit(current_char_)) {
    result = (result << 3) + (result << 1) + current_char_ - '0';
    shift_char();
  }
  return (is_negative ? result * -1 : result);
}
template <typename T>
void IO::print_number(const T& value) {
  T current_value = value;
  if (write_buffer_offset_ + 32 > kBufferSize) {
    flush();
  }
  if (current_value < 0) {
    write_buffer_[write_buffer_offset_++] = '-';
    current_value = abs(current_value);
  } else if (current_value == 0) {
    write_buffer_[write_buffer_offset_++] = '0';
    return;
  }
  std::size_t start_index = write_buffer_offset_;
  while (current_value != 0) {
    write_buffer_[write_buffer_offset_++] = current_value % 10 + '0';
    current_value /= 10;
  }
  std::reverse(write_buffer_.begin() + start_index,
               write_buffer_.begin() + write_buffer_offset_);
}
inline void IO::update_buffer() {
  if (read_buffer_offset_ == read_bytes_count_) {
    read_bytes_count_ = fread(&read_buffer_[0], sizeof(read_buffer_[0]),
                              read_buffer_.size(), stdin);
    if (read_bytes_count_ == 0) {
      eof_ = true;
      return;
    }
    read_buffer_offset_ = 0;
  }
}
inline void IO::shift_char() {
  update_buffer();
  current_char_ = read_buffer_[read_buffer_offset_++];
}
inline int32_t IO::next_int() { return read_number<int32_t>(); }
IO& IO::operator>>(int32_t& x) {
  x = ::next_int();
  return *this;
}
inline void IO::flush() {
  fwrite(&write_buffer_[0], sizeof(write_buffer_[0]), write_buffer_offset_,
         stdout);
  write_buffer_offset_ = 0;
}
inline void IO::new_line() {
  if (write_buffer_offset_ == kBufferSize) {
    flush();
  }
  write_buffer_[write_buffer_offset_++] = '\n';
}
inline void IO::print_int(const int32_t x) { print_number(x); }
IO& IO::operator<<(const int32_t x) {
  ::print_int(x);
  return *this;
}
IO& IO::operator<<(std::ostream& (*)(std::ostream&)) {
  ::new_line();
  return *this;
}
inline int32_t next_int() {
  if (useFastIO) {
    return io.next_int();
  }
  int32_t ret;
  *pin >> ret;
  return ret;
}
inline void new_line() {
  if (useFastIO) {
    io.new_line();
    return;
  }
  *pout << std::endl;
}
inline void print_int(const int32_t x) {
  if (useFastIO) {
    io.print_int(x);
    return;
  }
  *pout << x;
}
