import java.util.*;
 
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = Integer.parseInt(sc.next());
        int Q = Integer.parseInt(sc.next());
        int R = Integer.parseInt(sc.next());
        
        int ans = 0;
        
        if(P <= Q && P <= R) {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        }else if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        }
        
        System.out.println(ans);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = Integer.parseInt(sc.next());
        int Q = Integer.parseInt(sc.next());
        int R = Integer.parseInt(sc.next());
        
        int ans = 0;
        
        if(P <= Q && P <= R) {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        }else if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = Integer.parseInt(sc.next());
        int Q = Integer.parseInt(sc.next());
        int R = Integer.parseInt(sc.next());
        
        int ans = 0;
        
        if(P <= Q && P <= R) {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        }else if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        }
        
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int P = Integer.parseInt(sc.next());
        int Q = Integer.parseInt(sc.next());
        int R = Integer.parseInt(sc.next());
        
        int ans = 0;
        
        if(P <= Q && P <= R) {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        }else if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        }
        
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int P = Integer.parseInt(sc.next()); P Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int Q = Integer.parseInt(sc.next()); Q Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int R = Integer.parseInt(sc.next()); R Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 0; ans 0 if(P <= Q && P <= R) {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        }else if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        } P <= Q && P <= R P <= Q P Q P <= R P R {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        } if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            } Q <= R Q R {
                ans = P+Q;
            } ans = P+Q ans P+Q P Q {
                ans = P+R;
            } ans = P+R ans P+R P R if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        } Q <= P && Q <= R Q <= P Q P Q <= R Q R {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        } if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            } P <= R P R {
                ans = Q+P;
            } ans = Q+P ans Q+P Q P {
                ans = Q+R;
            } ans = Q+R ans Q+R Q R if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        } R <= Q && R <= P R <= Q R Q R <= P R P {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        } if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            } Q <= P Q P {
                ans = R+Q;
            } ans = R+Q ans R+Q R Q {
                ans = R+P;
            } ans = R+P ans R+P R P System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
 
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = Integer.parseInt(sc.next());
        int Q = Integer.parseInt(sc.next());
        int R = Integer.parseInt(sc.next());
        
        int ans = 0;
        
        if(P <= Q && P <= R) {
            if(Q <= R) {
                ans = P+Q;
            }else {
                ans = P+R;
            }
        }else if(Q <= P && Q <= R) {
            if(P <= R) {
                ans = Q+P;
            }else {
                ans = Q+R;
            }
        }else if(R <= Q && R <= P) {
            if(Q <= P) {
                ans = R+Q;
            }else {
                ans = R+P;
            }
        }
        
        System.out.println(ans);
    }
}