#include <iostream>
#include<bits/stdc++.h>
using namespace std;
int main() {
int a, b, sum;
sum = 0;
cin>>a>>b;
int arr[2];
arr[0] = a;
arr[1] = b;
sort(arr, arr+2);
for(int i = a; i <= b; i++){
if(i%2==0){
sum += 1;
}
}
cout << sum;
}