import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author teiwa
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.Collections; Collections java.util import java.util.ArrayList; ArrayList java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskA solver = new TaskA(); solver new TaskA() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        }

    } TaskA public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        } solve {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        } int P = in.nextInt(); P in.nextInt() in.nextInt in int Q = in.nextInt(); Q in.nextInt() in.nextInt in int R = in.nextInt(); R in.nextInt() in.nextInt in List<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 out.println(list.get(0) + list.get(1)) out.println out list.get(0) + list.get(1) list.get(0) list.get list 0 list.get(1) list.get list 1 int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.List;
import java.util.Scanner;
import java.util.Collections;
import java.util.ArrayList;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author teiwa
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int P = in.nextInt();
            int Q = in.nextInt();
            int R = in.nextInt();
            List<Integer> list = new ArrayList<>();
            list.add(P);
            list.add(Q);
            list.add(R);
            Collections.sort(list);
            out.println(list.get(0) + list.get(1));
        }

    }
}

