A,B,C=map(int,input().split()) print(min(abs(A-B),abs(C-B),abs(A-B)))