import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	}

} Main public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	} main {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int P=scan.nextInt(); P scan.nextInt() scan.nextInt scan int Q=scan.nextInt(); Q scan.nextInt() scan.nextInt scan int R=scan.nextInt(); R scan.nextInt() scan.nextInt scan System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R)))) System.out.println System.out System System.out P+Q+R-(Math.max(Q,Math.max(P, R))) P+Q+R P+Q+R P Q R (Math.max(Q,Math.max(P, R))) Math.max Math Q Math.max(P, R) Math.max Math P R String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int P=scan.nextInt();
		int Q=scan.nextInt();
		int R=scan.nextInt();
		System.out.println(P+Q+R-(Math.max(Q,Math.max(P, R))));

	}

}
