a = [] try: while True: a.append(input()) except EOFError: pass del a[0] del a[0] a.sort() print (int(a[-1]) - int(a[0]))