import java.util.ArrayList;
import java.util.Collections;
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();
        sc.close();

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util 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();
        sc.close();

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    }
} 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();
        sc.close();

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    } main {

        Scanner sc = new Scanner(System.in);

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

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    } 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 sc.close() sc.close sc int tmp=0; tmp 0 ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() list.add(P) list.add list P list.add(Q) list.add list Q list.add(R) list.add list R Collections.sort(list) Collections.sort Collections list int one = list.get(0); one list.get(0) list.get list 0 int two = list.get(1); two list.get(1) list.get list 1 System .out.println(one+two) System .out.println System .out System System .out one+two one two 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();
        sc.close();

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    }
} 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();
        sc.close();

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    }
} Main
import java.util.ArrayList;
import java.util.Collections;
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();
        sc.close();

        int tmp=0;

        ArrayList<Integer> list = new ArrayList<>();

        list.add(P);
        list.add(Q);
        list.add(R);

        Collections.sort(list);

        int one = list.get(0);
        int two = list.get(1);

        System .out.println(one+two);

    }
}