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 x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  }
} 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 x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  }
} 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 x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  } main {
    Scanner sc=new Scanner(System.in);
    int p=sc.nextInt();
    int q=sc.nextInt();
    int r=sc.nextInt();
    int x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  } 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 x x y y z; z x=p+q x p+q p q y=q+r y q+r q r z=r+p z r+p r p if(x<=y&&x<=z){
      System.out.println(x);
    } x<=y&&x<=z x<=y x y x<=z x z {
      System.out.println(x);
    } System.out.println(x) System.out.println System.out System System.out x if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    } y<=x&&y<=z&&x!=y y<=x&&y<=z&&x!=y y<=x y x y<=z y z x!=y x y {
      System.out.println(y);
    } System.out.println(y) System.out.println System.out System System.out y if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    } z<=x&&z<=y&&z!=x&&z!=y z!=x z<=x&&z<=y&&z!=x&&z!=y z<=x z x z<=y z y z!=x z x z!=y z y {
      System.out.println(z);
    } System.out.println(z) System.out.println System.out System System.out z 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 x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  }
} 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 x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  }
} 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 x,y,z;
    x=p+q;
    y=q+r;
    z=r+p;
    if(x<=y&&x<=z){
      System.out.println(x);
    }
    if(y<=x&&y<=z&&x!=y){
      System.out.println(y);
    }
    if(z<=x&&z<=y&&z!=x&&z!=y){
      System.out.println(z);
    }
  }
}
