import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    } main {
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int p = sc.nextInt(); p sc.nextInt() sc.nextInt sc int q = sc.nextInt(); q sc.nextInt() sc.nextInt sc int r = sc.nextInt(); r sc.nextInt() sc.nextInt sc int sum = p+q+r; sum p+q+r p+q+r p q r sum= (sum-p)<(sum-q)?(sum-p):(sum-q) sum (sum-p)<(sum-q)?(sum-p):(sum-q) (sum-p)<(sum-q) (sum-p) sum p (sum-q) sum q (sum-p) sum p (sum-q) sum q sum= sum<(p+q)?sum:(p+q) sum sum<(p+q)?sum:(p+q) sum<(p+q) sum (p+q) p q sum (p+q) p q System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int sum = p+q+r;
        sum= (sum-p)<(sum-q)?(sum-p):(sum-q);
        sum= sum<(p+q)?sum:(p+q);
        System.out.println(sum);
            
        // 出力
       
    }
}
