import java.util.Scanner;

public class Main{
    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    }
} Main public static void main(String args[]){

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    } main {

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) Integer P = Integer.parseInt(scan.next()); P Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan Integer Q = Integer.parseInt(scan.next()); Q Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan Integer R = Integer.parseInt(scan.next()); R Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) ) System.out.println System.out System System.out P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) P+Q < P+R P+Q P Q P+R P R (P+Q < Q+R ? P+Q : Q+R) P+Q < Q+R P+Q P Q Q+R Q R P+Q P Q Q+R Q R (P+R < Q+R ? P+R : Q+R) P+R < Q+R P+R P R Q+R Q R P+R P R Q+R Q R String args[] args public class Main{
    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    }
} public class Main{
    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String args[]){

        Scanner scan = new Scanner(System.in);
        Integer P = Integer.parseInt(scan.next());
        Integer Q = Integer.parseInt(scan.next());
        Integer R = Integer.parseInt(scan.next());

        System.out.println(P+Q < P+R ? (P+Q < Q+R ? P+Q : Q+R) : (P+R < Q+R ? P+R : Q+R) );
    }
}