import java.io.*;
import java.util.*;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    }
}

class Solver {
    public void solve(long P, long Q, long R) {
        long M = Math.max(P, Math.max(Q, R));
        System.out.println(P + Q + R - M);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    }
} Main public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    } main {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long P; P P = sc.nextLong() P sc.nextLong() sc.nextLong sc long Q; Q Q = sc.nextLong() Q sc.nextLong() sc.nextLong sc long R; R R = sc.nextLong() R sc.nextLong() sc.nextLong sc final Solver solver = new Solver(); solver new Solver() solver.solve(P, Q, R) solver.solve solver P Q R final String[] args args class Solver {
    public void solve(long P, long Q, long R) {
        long M = Math.max(P, Math.max(Q, R));
        System.out.println(P + Q + R - M);
    }
} Solver public void solve(long P, long Q, long R) {
        long M = Math.max(P, Math.max(Q, R));
        System.out.println(P + Q + R - M);
    } solve {
        long M = Math.max(P, Math.max(Q, R));
        System.out.println(P + Q + R - M);
    } long M = Math.max(P, Math.max(Q, R)); M Math.max(P, Math.max(Q, R)) Math.max Math P Math.max(Q, R) Math.max Math Q R System.out.println(P + Q + R - M) System.out.println System.out System System.out P + Q + R - M P + Q + R P + Q + R P Q R M long P P long Q Q long R R public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    }
} public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    }
} Main
import java.io.*;
import java.util.*;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long P;
        P = sc.nextLong();
        long Q;
        Q = sc.nextLong();
        long R;
        R = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(P, Q, R);
    }
}

class Solver {
    public void solve(long P, long Q, long R) {
        long M = Math.max(P, Math.max(Q, R));
        System.out.println(P + Q + R - M);
    }
}
