import java.util.*; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(Math.min(Math.min(p+q, p+r), q+r));
  }
}
   import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(Math.min(Math.min(p+q, p+r), q+r));
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(Math.min(Math.min(p+q, p+r), q+r));
  } main {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(Math.min(Math.min(p+q, p+r), q+r));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int p = Integer.parseInt(sc.next()); p Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int q = Integer.parseInt(sc.next()); q Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int r = Integer.parseInt(sc.next()); r Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc System.out.print(Math.min(Math.min(p+q, p+r), q+r)) System.out.print System.out System System.out Math.min(Math.min(p+q, p+r), q+r) Math.min Math Math.min(p+q, p+r) Math.min Math p+q p q p+r p r q+r q r String[] args args
import java.util.*; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(Math.min(Math.min(p+q, p+r), q+r));
  }
}
  
