let n = readLine()!.split(separator: " ").map{Int($0)!} print([abs(n[0]-n[1]),abs(n[1]-n[2])].min()!)