import java.util.Scanner;
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 ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner 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 ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	}
} 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 ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int p=sc.nextInt();
		int q = sc.nextInt();
		int r=sc.nextInt();
		int ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	} 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 ans=400; ans 400 if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		} p+q<p+r p+q p q p+r p r {
			ans=p+q;
		} ans=p+q ans p+q p q {
			ans=p+r;
		} ans=p+r ans p+r p r if(r+q<ans){
			ans=r+q;
		} r+q<ans r+q r q ans {
			ans=r+q;
		} ans=r+q ans r+q r q System.out.println(ans) System.out.println System.out System System.out ans 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 ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	}
} 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 ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;
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 ans=400;
		if(p+q<p+r){
			ans=p+q;
		}else{
			ans=p+r;
		}
		if(r+q<ans){
			ans=r+q;
		}
		System.out.println(ans);
	}
}
