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();
    int pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  }
} 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();
    int pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  }
} 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 pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  } main {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();
    int pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  } 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 pt1 = p+q; pt1 p+q p q int pt2 = p+r; pt2 p+r p r int pt3 = r+q; pt3 r+q r q if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    } pt1<=pt2 pt1 pt2 {
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    } if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      } pt1<=pt3 pt1 pt3 {
        System.out.println(pt1);
      } System.out.println(pt1) System.out.println System.out System System.out pt1 {
        System.out.println(pt3);
      } System.out.println(pt3) System.out.println System.out System System.out pt3 {
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    } if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      } pt2<=pt3 pt2 pt3 {
        System.out.println(pt2);
      } System.out.println(pt2) System.out.println System.out System System.out pt2 {
        System.out.println(pt3);
      } System.out.println(pt3) System.out.println System.out System System.out pt3 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();
    int pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  }
} 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();
    int pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  }
} 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();
    int pt1 = p+q;
    int pt2 = p+r;
    int pt3 = r+q;
    if(pt1<=pt2){
      if(pt1<=pt3){
        System.out.println(pt1);
      }else{
        System.out.println(pt3);
      }
    }else{
      if(pt2<=pt3){
        System.out.println(pt2);
      }else{
        System.out.println(pt3);
      }
    }  
  }
}