#include <stdio.h>

int main()
{
  int a, b;

  scanf("%d%d", &a, &b);
  printf("%d\n", (b + 1) / 2 - a / 2);
  return 0;
}