#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,bedethailan=0;
cin>>a>>b>>c;
if(a>b) swap(a,b);
if(a>c) swap(a,c);
if(b>c) swap(b,c);
if((a+b)%2!=0) bedethailan=bedethailan+2;
cout<<(c-b)+(b-a)/2+bedethailan;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKXsKCWludCBhLGIsYyxiZWRldGhhaWxhbj0wOwoJY2luPj5hPj5iPj5jOwoJaWYoYT5iKSBzd2FwKGEsYik7CglpZihhPmMpIHN3YXAoYSxjKTsKCWlmKGI+Yykgc3dhcChiLGMpOwoJaWYoKGErYiklMiE9MCkgYmVkZXRoYWlsYW49YmVkZXRoYWlsYW4rMjsKCWNvdXQ8PChjLWIpKyhiLWEpLzIrYmVkZXRoYWlsYW47Cn0=