import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int p = scan.nextInt(); p scan.nextInt() scan.nextInt scan int q = scan.nextInt(); q scan.nextInt() scan.nextInt scan int r = scan.nextInt(); r scan.nextInt() scan.nextInt scan if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        } Math.max(Math.max(p, q), r) == p Math.max(Math.max(p, q), r) Math.max Math Math.max(p, q) Math.max Math p q r p {
            System.out.println(q + r);
        } System.out.println(q + r) System.out.println System.out System System.out q + r q r if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        } Math.max(Math.max(p, q), r) == q Math.max(Math.max(p, q), r) Math.max Math Math.max(p, q) Math.max Math p q r q {
            System.out.println(p + r);
        } System.out.println(p + r) System.out.println System.out System System.out p + r p r {
            System.out.println(p + q);
        } System.out.println(p + q) System.out.println System.out System System.out p + q p q String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int p = scan.nextInt();
        int q = scan.nextInt();
        int r = scan.nextInt();

        if (Math.max(Math.max(p, q), r) == p) {
            System.out.println(q + r);
        } else if (Math.max(Math.max(p, q), r) == q) {
            System.out.println(p + r);
        } else {
            System.out.println(p + q);
        }
    }
}