import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        solve();
    } main {
        solve();
    } solve() solve String[] args args private static void solve() {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    } solve {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int p = input.nextInt(); p input.nextInt() input.nextInt input int q = input.nextInt(); q input.nextInt() input.nextInt input int r = input.nextInt(); r input.nextInt() input.nextInt input int a = p + q; a p + q p q int b = q + r; b q + r q r int c = r + p; c r + p r p int ans = Math.min(a, Math.min(b, c)); ans Math.min(a, Math.min(b, c)) Math.min Math a Math.min(b, c) Math.min Math b c System.out.println(ans) System.out.println System.out System System.out ans public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int p = input.nextInt();
        int q = input.nextInt();
        int r = input.nextInt();

        int a = p + q;
        int b = q + r;
        int c = r + p;

        int ans = Math.min(a, Math.min(b, c));

        System.out.println(ans);
    }
}
