import algorithm, sequtils, strutils var ns = stdin.readLine.split.map parseInt sort ns echo (ns[1] - ns[0]).min ns[2] - ns[1]