import java.util.*;
import java.lang.*;
import java.io.*;

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[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* 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[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	}
} 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[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	} main {
	Scanner sc = new Scanner(System.in);
	int p = sc.nextInt();
	int q = sc.nextInt();
	int r = sc.nextInt();
	int[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	} 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[] times = new int[3]; times new int[3] 3 times[0]=p+q times[0] times 0 p+q p q times[1]=q+r times[1] times 1 q+r q r times[2]=r+p times[2] times 2 r+p r p int min=0; min 0 for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	} int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	} {
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	} if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		} i==0 i 0 {
			min=times[0];
		} min=times[0] min times[0] times 0 {
			min=Math.min(min,times[i]);
		} min=Math.min(min,times[i]) min Math.min(min,times[i]) Math.min Math min times[i] times i System.out.println(min) System.out.println System.out System System.out min 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[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	}
} 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[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	}
} Main
import java.util.*;
import java.lang.*;
import java.io.*;

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[] times = new int[3];
	times[0]=p+q;
	times[1]=q+r;
	times[2]=r+p;
	int min=0;
	for(int i=0;i<3;i++){
		if(i==0){
			min=times[0];
		}else{
			min=Math.min(min,times[i]);
		}
	}
	System.out.println(min);
	}
}