import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    }
} import java.io.File; File java.io import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    }
} Main public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    } main {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int p = s.nextInt(); p s.nextInt() s.nextInt s int q = s.nextInt(); q s.nextInt() s.nextInt s int r = s.nextInt(); r s.nextInt() s.nextInt s int pq = p + q; pq p + q p q int pr = p + r; pr p + r p r int qr = r + q; qr r + q r q if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        } pq == Math.min(Math.min(pq, pr), qr) pq Math.min(Math.min(pq, pr), qr) Math.min Math Math.min(pq, pr) Math.min Math pq pr qr {
            System.out.println(pq);
        } System.out.println(pq) System.out.println System.out System System.out pq if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        } pr == Math.min(Math.min(pq, pr), qr) pr Math.min(Math.min(pq, pr), qr) Math.min Math Math.min(pq, pr) Math.min Math pq pr qr {
            System.out.println(pr);
        } System.out.println(pr) System.out.println System.out System System.out pr {
            System.out.println(qr);
        } System.out.println(qr) System.out.println System.out System System.out qr String[] args args public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    }
} public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    }
} Main
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner s = new Scanner(System.in);

        int p = s.nextInt(); // A<=>B
        int q = s.nextInt(); // B<=>C
        int r = s.nextInt(); // C<=>A

        int pq = p + q;
        int pr = p + r;
        int qr = r + q;

        if (pq == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pq);
        } else if (pr == Math.min(Math.min(pq, pr), qr)) {
            System.out.println(pr);
        } else {
            System.out.println(qr);
        }
    }
}
