a=list(map(int,input().split())) a.sort(reverse=True) print(min(a[0]-a[1],a[1]-a[2]))