import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    }
} Main public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    } main {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    } Scanner kbd = new Scanner(System.in); kbd new Scanner(System.in) int p = kbd.nextInt(); p kbd.nextInt() kbd.nextInt kbd int q = kbd.nextInt(); q kbd.nextInt() kbd.nextInt kbd int r = kbd.nextInt(); r kbd.nextInt() kbd.nextInt kbd int pq = p + q; pq p + q p q int qr = q + r; qr q + r q r int rp = r + p; rp r + p r p if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        } pq <= qr && pq <= rp pq <= qr pq qr pq <= rp pq rp {
            System.out.println(pq);
        } System.out.println(pq) System.out.println System.out System System.out pq if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        } qr <= pq && qr <= rp qr <= pq qr pq qr <= rp qr rp {
            System.out.println(qr);
        } System.out.println(qr) System.out.println System.out System System.out qr if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        } rp <= pq && rp <= qr rp <= pq rp pq rp <= qr rp qr {
            System.out.println(rp);
        } System.out.println(rp) System.out.println System.out System System.out rp String[] args args public class Main {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner kbd = new Scanner(System.in);
        int p = kbd.nextInt();
        int q = kbd.nextInt();
        int r = kbd.nextInt();
        int pq = p + q;
        int qr = q + r;
        int rp = r + p;
        if (pq <= qr && pq <= rp) {
            System.out.println(pq);
        } else if (qr <= pq && qr <= rp) {
            System.out.println(qr);
        } else if (rp <= pq && rp <= qr) {
            System.out.println(rp);
        }
    }
}