import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	}
}
	 import java.util.*; util.* java import java.io.*; io.* java public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	}
} Main public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	} main {
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) int p=in.nextInt(); p in.nextInt() in.nextInt in int q=in.nextInt(); q in.nextInt() in.nextInt in int r=in.nextInt(); r in.nextInt() in.nextInt in int a=q+Math.min(p,r); a q+Math.min(p,r) q Math.min(p,r) Math.min Math p r int b=p+Math.min(q,r); b p+Math.min(q,r) p Math.min(q,r) Math.min Math q r int c=r+Math.min(p,q); c r+Math.min(p,q) r Math.min(p,q) Math.min Math p q System.out.println(Math.min(a,Math.min(b,c))) System.out.println System.out System System.out Math.min(a,Math.min(b,c)) Math.min Math a Math.min(b,c) Math.min Math b c String [] Args Args public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	}
} public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	}
} Main
import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] Args)
	{
		Scanner in=new Scanner(System.in);
		int p=in.nextInt();
		int q=in.nextInt();
		int r=in.nextInt();
		int a=q+Math.min(p,r);
		int b=p+Math.min(q,r);
		int c=r+Math.min(p,q);
		System.out.println(Math.min(a,Math.min(b,c)));
	}
}
	