import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    }

} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    } main {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    } int p = sc.nextInt(); p sc.nextInt() sc.nextInt sc int q = sc.nextInt(); q sc.nextInt() sc.nextInt sc int r = sc.nextInt(); r sc.nextInt() sc.nextInt sc int[] n = new int[] {p+q, q+r, r+p}; n new int[] {p+q, q+r, r+p} int min = p+q; min p+q p q for (int i : n) {
            if (min >= i) {
                min = i;
            }
        } int i n {
            if (min >= i) {
                min = i;
            }
        } {
            if (min >= i) {
                min = i;
            }
        } if (min >= i) {
                min = i;
            } min >= i min i {
                min = i;
            } min = i min i System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    }

} public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    }

} Main
import java.util.Scanner;

public class Main {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        int[] n = new int[] {p+q, q+r, r+p};
        int min = p+q;
        for (int i : n) {
            if (min >= i) {
                min = i;
            }
        }
        System.out.println(min);
    }

}
