import java.util.Arrays;
import java.util.Scanner;

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();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner 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();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  }
} 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();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  } main {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  } 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 sc.close() sc.close sc int[] val = {p, q, r}; val {p, q, r} p q r Arrays.sort(val) Arrays.sort Arrays val System.out.println(val[0] + val[1]) System.out.println System.out System System.out val[0] + val[1] val[0] val 0 val[1] val 1 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();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  }
} 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();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  }
} Main
import java.util.Arrays;
import java.util.Scanner;

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();
    sc.close();
    int[] val = {p, q, r};
    Arrays.sort(val);
    System.out.println(val[0] + val[1]);
  }
}