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();

        System.out.println(solve(P, Q, R));

        sc.close();
    }

    static int solve(int P, int Q, int R) {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    }
} 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();

        System.out.println(solve(P, Q, R));

        sc.close();
    }

    static int solve(int P, int Q, int R) {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    }
} 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();

        System.out.println(solve(P, Q, R));

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();

        System.out.println(solve(P, Q, R));

        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 System.out.println(solve(P, Q, R)) System.out.println System.out System System.out solve(P, Q, R) solve P Q R sc.close() sc.close sc String[] args args static int solve(int P, int Q, int R) {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    } solve {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    } return P + Q + R - Math.max(Math.max(P, Q), R); P + Q + R - Math.max(Math.max(P, Q), R) P + Q + R P + Q + R P Q R Math.max(Math.max(P, Q), R) Math.max Math Math.max(P, Q) Math.max Math P Q R int P P int Q Q int R R 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();

        System.out.println(solve(P, Q, R));

        sc.close();
    }

    static int solve(int P, int Q, int R) {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    }
} 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();

        System.out.println(solve(P, Q, R));

        sc.close();
    }

    static int solve(int P, int Q, int R) {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    }
} 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();

        System.out.println(solve(P, Q, R));

        sc.close();
    }

    static int solve(int P, int Q, int R) {
        return P + Q + R - Math.max(Math.max(P, Q), R);
    }
}