import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    } main {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) 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 System.out.println(p+q+r-Math.max(Math.max(p,q),r)) System.out.println System.out System System.out p+q+r-Math.max(Math.max(p,q),r) p+q+r p+q+r p q r Math.max(Math.max(p,q),r) Math.max Math Math.max(p,q) Math.max Math p q r String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int p = sc.nextInt();
        int q = sc.nextInt();
        int r = sc.nextInt();
        System.out.println(p+q+r-Math.max(Math.max(p,q),r));
    }
}
