import java.util.*;

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

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