import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    }
} import java.util.Scanner; Scanner java.util import java.util.stream.IntStream; IntStream java.util.stream public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    } main {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int P = sc.nextInt(); P sc.nextInt() sc.nextInt sc final int Q = sc.nextInt(); Q sc.nextInt() sc.nextInt sc final int R = sc.nextInt(); R sc.nextInt() sc.nextInt sc System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum()) System.out.println System.out System System.out IntStream.of(P, Q, R).sorted().limit(2).sum() IntStream.of(P, Q, R).sorted().limit(2).sum IntStream.of(P, Q, R).sorted().limit(2) IntStream.of(P, Q, R).sorted().limit IntStream.of(P, Q, R).sorted() IntStream.of(P, Q, R).sorted IntStream.of(P, Q, R) IntStream.of IntStream P Q R 2 String[] args args public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    }
} public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    }
} Main
import java.util.Scanner;
import java.util.stream.IntStream;

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

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

        System.out.println(IntStream.of(P, Q, R).sorted().limit(2).sum());
    }
}
