#include<iostream>
using namespace std;

long long A, B, K, br=0, i;

int main ()
{
    cin >> A >> B >> K;
    if ((B-A)%2==0)
        cout << (B-A)/2;
    else
        cout << (B-A)/2+1;
    cout << endl;
    return 0;
}

