#include <cstdio>
using namespace std;
int mid(int a,int b,int c){
    if(a>=b&&a>=c){
        if(b>=c){
            return b;
        } else{
            return c;
        }
    } else if(a<=b&&a<=c){
        if(b>=c){
            return c;
        } else{
            return b;
        }
    } else{
        return a;
    }
}
int maxnum(int a,int b,int c){
    if(a>=b&&a>=c){
        return a;
    } else if(b>=a&&b>=c){
        return b;
    } else if(c>=b&&c>=a){
        return c;
    } else{
        return c;
    }
}
int minnum(int a,int b,int c){
    if(a<=b&&a<=c){
        return a;
    } else if(b<=a&&b<=c){
        return b;
    } else if(c<=b&&c<=a){
        return c;
    } else{
        return c;
    }
}
int main(){
    int a,b,c;
    while (scanf("%d%d%d",&a,&b,&c)!=EOF){
        printf("%d\n", minnum(a,b,c)+mid(a,b,c)- maxnum(a,b,c));
    }
}