package contest200113; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; // 片手落ちマン public class B2 { static Scanner in; static PrintWriter out; static String INPUT = ""; static void solve() { int A = ni(), B = ni(), C = ni(); if(!(1 <= A && A <= 1000000000))throw new RuntimeException(); if(!(1 <= B && B <= 1000000000))throw new RuntimeException(); if(!(1 <= C && C <= 1000000000))throw new RuntimeException(); if(!(B < A && A < C || C < A && A < B || B < C && C < A || A < C && C < B)) { throw new RuntimeException(); } out.println(Math.min(Math.abs(A-B), Math.abs(A-C))); } public static void main(String[] args) throws Exception { in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT); out = new PrintWriter(System.out); solve(); out.flush(); } static int ni() { return Integer.parseInt(in.next()); } static long nl() { return Long.parseLong(in.next()); } static double nd() { return Double.parseDouble(in.next()); } static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); } }