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