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