#include<stdio.h>
int main()
{
int a,b,c,x,y,z,ans;
scanf("%d%d%d",&a,&b,&c);
if(a>b)
x=a-b;
else
x=b-a;
if(b>c)
y=b-c;
else
y=c-b;
if(a>c)
z=a-c;
else
z=c-a;
if(x>=y && x>=z)ans=y+z;
else if(y>=x && y>=z)ans=x+z;
else if(z>=x && z>=y)ans=x+y;
printf("%d\n",ans);
return 0;
}
