//
// main.c
// practice
//
// Created by Chen on 2018/6/24.
// Copyright © 2018年 Chen. All rights reserved.
//
#include <stdio.h>
#include <math.h>
int main(int argc, const char * argv[]) {
int a,b;
while (scanf("%d%d",&a,&b)!=EOF) {
int sum=(b-a)/2 +(!(a%2)||!(b%2));
printf("%d\n",sum);
}
return 0;
}