#include <iostream>
using namespace std;
int a,b,c,mm;
int main()
{
cin>>a>>b>>c;
if((a<=b)&&(b<=c)) mm=c-a;
if((a<=c)&&(c<=b)) mm=b-a;
if((b<=a)&&(a<=c)) mm=c-b;
if((b<=c)&&(c<=a)) mm=a-b;
if((c<=a)&&(a<=b)) mm=b-c;
if((c<=b)&&(b<=a)) mm=a-c;
cout<<mm;
return 0;
}