#include<stdio.h>

int main()
{
int a,b,c,cost=0;
int max,min,mid;
scanf("%d%d%d",&a,&b,&c);
min = (a<b)?a:b;
min=(min<c)?min:c;

max = (a>b)?a:b;
max=(max>c)?max:c;

if(a!=max && a!= min) mid =a;
else if(b!=max && b!= min) mid =b;
else mid = c;

//printf("%d %d %d\n",max,mid,min);

printf ("%d\n",((mid-min)+(max-mid)));




    return 0;
}