import java.util.Arrays;
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[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    }

} import java.util.Arrays; Arrays 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();

        int[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    }

} 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[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();

        int[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    } 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[] route = { p, q, r }; route { p, q, r } p q r Arrays.sort(route) Arrays.sort Arrays route int ans = 0; ans 0 ans += route[0] ans route[0] route 0 ans += route[1] ans route[1] route 1 System.out.println(ans) System.out.println System.out System System.out ans 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[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    }

} 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[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    }

} Main
import java.util.Arrays;
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[] route = { p, q, r };
        Arrays.sort(route);

        int ans = 0;
        ans += route[0];
        ans += route[1];

        System.out.println(ans);
    }

}
