import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } 
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]){
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } 
} Main public static void main(String args[]){
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } main {
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } int cost; cost int temp; temp Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan if(a>b){
            temp = b;
            b = a;
            a = temp;
        } a>b a b {
            temp = b;
            b = a;
            a = temp;
        } temp = b temp b b = a b a a = temp a temp if(b>c){
            temp=c;
            c=b;
            b=temp;
        } b>c b c {
            temp=c;
            c=b;
            b=temp;
        } temp=c temp c c=b c b b=temp b temp if(a>b){
            temp = b;
            b = a;
            a = temp;
        } a>b a b {
            temp = b;
            b = a;
            a = temp;
        } temp = b temp b b = a b a a = temp a temp cost = (b-a)+(c-b) cost (b-a)+(c-b) (b-a) b a (c-b) c b System.out.println(cost) System.out.println System.out System System.out cost String args[] args public class Main {
    public static void main(String args[]){
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } 
} public class Main {
    public static void main(String args[]){
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } 
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        int cost;
        int temp;
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
    
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        if(b>c){
            temp=c;
            c=b;
            b=temp;
        }
        if(a>b){
            temp = b;
            b = a;
            a = temp;
        }
        cost = (b-a)+(c-b);
        System.out.println(cost);
    } 
}