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