import 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 = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	}

} import java.util.*; util.* 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 ans = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	}

} 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 = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int ans = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	} 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 = P + Q; ans P + Q P Q if(P + R < ans) {
			ans = P + R;
		} P + R < ans P + R P R ans {
			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 sc.close() sc.close sc 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 = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	}

} 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 = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	}

} Main
import 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 = P + Q;
		if(P + R < ans) {
			ans = P + R;
		}
		if(R + Q < ans) {
			ans = R + Q;
		}
		System.out.println(ans);
		sc.close();
	}

}