a=list(map(int,input().split())) a.sort() biggest=a[2] midium=a[1] small=a[0] print(min(abs(midium-small),abs(biggest-midium)))