import java.util.Scanner;
public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 }
} import java.util.Scanner; Scanner java.util public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 }
} Main public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 } main {
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 } Scanner std = new Scanner(System.in); std new Scanner(System.in) int p = std.nextInt(); p std.nextInt() std.nextInt std int q = std.nextInt(); q std.nextInt() std.nextInt std int r = std.nextInt(); r std.nextInt() std.nextInt std if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 } p<=q&&r<=q p<=q p q r<=q r q {
			 System.out.println(p+r);
		 } System.out.println(p+r) System.out.println System.out System System.out p+r p r if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 } q<=p&&r<=p q<=p q p r<=p r p {
			 System.out.println(q+r);
		 } System.out.println(q+r) System.out.println System.out System System.out q+r q r if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 } q<=r&&p<=r q<=r q r p<=r p r {
			 System.out.println(q+p);
		 } System.out.println(q+p) System.out.println System.out System System.out q+p q p String args[] args public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 }
} public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 }
} Main
import java.util.Scanner;
public class Main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 }
}
