import java.util.*;
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();
    int root1 = P+Q;
    int root2 = P+R;
    int root3 = Q+R;
    if ((root1<=root2)&&(root1<=root3)){
      System.out.println(root1);
    } else if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    }
  }
} import java.util.*; util.* java 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();
    int root1 = P+Q;
    int root2 = P+R;
    int root3 = Q+R;
    if ((root1<=root2)&&(root1<=root3)){
      System.out.println(root1);
    } else if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    }
  }
} 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();
    int root1 = P+Q;
    int root2 = P+R;
    int root3 = Q+R;
    if ((root1<=root2)&&(root1<=root3)){
      System.out.println(root1);
    } else if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt();
    int root1 = P+Q;
    int root2 = P+R;
    int root3 = Q+R;
    if ((root1<=root2)&&(root1<=root3)){
      System.out.println(root1);
    } else if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    }
  } 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 root1 = P+Q; root1 P+Q P Q int root2 = P+R; root2 P+R P R int root3 = Q+R; root3 Q+R Q R if ((root1<=root2)&&(root1<=root3)){
      System.out.println(root1);
    } else if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    } (root1<=root2)&&(root1<=root3) (root1<=root2) root1 root2 (root1<=root3) root1 root3 {
      System.out.println(root1);
    } System.out.println(root1) System.out.println System.out System System.out root1 if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    } (root2<=root1)&&(root2<=root3) (root2<=root1) root2 root1 (root2<=root3) root2 root3 {
      System.out.println(root2);
    } System.out.println(root2) System.out.println System.out System System.out root2 {
      System.out.println(root3);
    } System.out.println(root3) System.out.println System.out System System.out root3 String[] args args
import java.util.*;
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();
    int root1 = P+Q;
    int root2 = P+R;
    int root3 = Q+R;
    if ((root1<=root2)&&(root1<=root3)){
      System.out.println(root1);
    } else if((root2<=root1)&&(root2<=root3)){
      System.out.println(root2);
    }else{
      System.out.println(root3);
    }
  }
}