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 ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  }
} 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 ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  }
} 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 ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int p = sc.nextInt();
    int q = sc.nextInt();
    int r = sc.nextInt();
    int ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  } 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 ans = Math.min(p+q,q+r); ans Math.min(p+q,q+r) Math.min Math p+q p q q+r q r ans = Math.min(ans,r+p) ans Math.min(ans,r+p) Math.min Math ans r+p r p System.out.println(ans) System.out.println System.out System System.out ans 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 ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  }
} 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 ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  }
} 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 ans = Math.min(p+q,q+r);
    ans = Math.min(ans,r+p);
    System.out.println(ans);
  }
}