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