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 min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		System.out.println(min);
	}
} 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 min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		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 min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		System.out.println(min);
	} main {
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();

		int min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		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 min = 1000; min 1000 if(p+q < min) {
			min = p+q;
		} p+q < min p+q p q min {
			min = p+q;
		} min = p+q min p+q p q if(p+r < min) {
			min = p+r;
		} p+r < min p+r p r min {
			min = p+r;
		} min = p+r min p+r p r if(r+q < min) {
			min = r+q;
		} r+q < min r+q r q min {
			min = r+q;
		} min = r+q min r+q r q 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 min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		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 min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		System.out.println(min);
	}
} 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 min = 1000;

		if(p+q < min) {
			min = p+q;
		}
		if(p+r < min) {
			min = p+r;
		}
		if(r+q < min) {
			min = r+q;
		}
		System.out.println(min);
	}
}