import java.util.Scanner;
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 max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    }
} import java.util.Scanner; Scanner 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 max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    }
} 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 max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    } 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 max = Math.max(p, q); max Math.max(p, q) Math.max Math p q max = Math.max(max, r) max Math.max(max, r) Math.max Math max r System.out.println(p + q + r - max) System.out.println System.out System System.out p + q + r - max p + q + r p + q + r p q r max sc.close() sc.close sc 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 max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    }
} 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 max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    }
} Main
import java.util.Scanner;
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 max = Math.max(p, q);
        max = Math.max(max, r);
        System.out.println(p + q + r - max);
        sc.close();
    }
}