#include<stdio.h>
int main()
{
    int a,b,c,t1,t2,t3;
    scanf("%d%d%d",&a,&b,&c);
    t1=abs(b-c)+abs(c-a);
    t2=abs(c-a)+abs(a-b);
    t3=abs(a-b)+abs(b-c);

    if(t1<=t2 && t1<=t3)
    {
        printf("%d\n",t1);
    }

    else if(t2<=t1 && t2<=t3)
    {
        printf("%d\n",t2);
    }

     else if(t3<=t1 && t3<=t2)
    {
        printf("%d\n",t3);
    }
    else
        printf("0\n");
    return 0;
}
