N, K = map(int, input().split()) print((K + N + 1) // 2)