#include <bits/stdc++.h> using namespace std; long double a, b; int main() { cin >> a >> b; cout << ceil((b - a) / 2); return 0; }