import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int r = scanner.nextInt();

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

        int a = p+q;
        int b = p+r;
        int c = r+q;
        
        int min1 = Math.min(a, b);
        min1 = Math.min(c, min1);
        System.out.println(min1);
    }
} Main public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int r = scanner.nextInt();

        int a = p+q;
        int b = p+r;
        int c = r+q;
        
        int min1 = Math.min(a, b);
        min1 = Math.min(c, min1);
        System.out.println(min1);
    } main {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int r = scanner.nextInt();

        int a = p+q;
        int b = p+r;
        int c = r+q;
        
        int min1 = Math.min(a, b);
        min1 = Math.min(c, min1);
        System.out.println(min1);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int p = scanner.nextInt(); p scanner.nextInt() scanner.nextInt scanner int q = scanner.nextInt(); q scanner.nextInt() scanner.nextInt scanner int r = scanner.nextInt(); r scanner.nextInt() scanner.nextInt scanner int a = p+q; a p+q p q int b = p+r; b p+r p r int c = r+q; c r+q r q int min1 = Math.min(a, b); min1 Math.min(a, b) Math.min Math a b min1 = Math.min(c, min1) min1 Math.min(c, min1) Math.min Math c min1 System.out.println(min1) System.out.println System.out System System.out min1 String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int r = scanner.nextInt();

        int a = p+q;
        int b = p+r;
        int c = r+q;
        
        int min1 = Math.min(a, b);
        min1 = Math.min(c, min1);
        System.out.println(min1);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int r = scanner.nextInt();

        int a = p+q;
        int b = p+r;
        int c = r+q;
        
        int min1 = Math.min(a, b);
        min1 = Math.min(c, min1);
        System.out.println(min1);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        int q = scanner.nextInt();
        int r = scanner.nextInt();

        int a = p+q;
        int b = p+r;
        int c = r+q;
        
        int min1 = Math.min(a, b);
        min1 = Math.min(c, min1);
        System.out.println(min1);
    }
}