import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Objects;

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();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  }
} import java.util.Scanner; Scanner java.util import java.util.List; List java.util import java.util.ArrayList; ArrayList java.util import java.util.Objects; Objects 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();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  }
} 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();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  } main {

    Scanner sc = new Scanner(System.in);

    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  } 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 int minTime = 1001; minTime 1001 minTime = Math.min(minTime, Q + R) minTime Math.min(minTime, Q + R) Math.min Math minTime Q + R Q R minTime = Math.min(minTime, P + R) minTime Math.min(minTime, P + R) Math.min Math minTime P + R P R minTime = Math.min(minTime, P + Q) minTime Math.min(minTime, P + Q) Math.min Math minTime P + Q P Q System.out.println(minTime) System.out.println System.out System System.out minTime 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();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  }
} 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();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  }
} Main
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Objects;

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();

    // a <-> b = P
    // b <-> c = Q
    // c <-> a = R

    int minTime = 1001;

    minTime = Math.min(minTime, Q + R);
    minTime = Math.min(minTime, P + R);
    minTime = Math.min(minTime, P + Q);
    System.out.println(minTime);
  }
}
