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[] hoge = {p, q, r};
      	Arrays.sort(hoge);
      	System.out.println(hoge[0] + hoge[1]);
    }
} 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[] hoge = {p, q, r};
      	Arrays.sort(hoge);
      	System.out.println(hoge[0] + hoge[1]);
    }
} 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[] hoge = {p, q, r};
      	Arrays.sort(hoge);
      	System.out.println(hoge[0] + hoge[1]);
    } main {
    	Scanner sc = new Scanner(System.in);
      	int p = sc.nextInt();
      	int q = sc.nextInt();
      	int r = sc.nextInt();
      
      	int[] hoge = {p, q, r};
      	Arrays.sort(hoge);
      	System.out.println(hoge[0] + hoge[1]);
    } 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[] hoge = {p, q, r}; hoge {p, q, r} p q r Arrays.sort(hoge) Arrays.sort Arrays hoge System.out.println(hoge[0] + hoge[1]) System.out.println System.out System System.out hoge[0] + hoge[1] hoge[0] hoge 0 hoge[1] hoge 1 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[] hoge = {p, q, r};
      	Arrays.sort(hoge);
      	System.out.println(hoge[0] + hoge[1]);
    }
}