import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 L=LI() L.sort() d1=L[1]-L[0] d2=L[2]-L[1] print(min(d1,d2)) main()