
// problem: "https://atcoder.jp/contests/abc129/tasks/abc129_a"

import java.util.Scanner;

class Main {
    public static void main (String args[]) {
        Scanner in = new Scanner(System.in);

        int p,q,r;

        p = in.nextInt();
        q = in.nextInt();
        r = in.nextInt();

        int ans = 0;
        if(p<=q && p<=r)
        {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        }
        else if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        }

        System.out.print(ans);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main (String args[]) {
        Scanner in = new Scanner(System.in);

        int p,q,r;

        p = in.nextInt();
        q = in.nextInt();
        r = in.nextInt();

        int ans = 0;
        if(p<=q && p<=r)
        {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        }
        else if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        }

        System.out.print(ans);
    }
} Main public static void main (String args[]) {
        Scanner in = new Scanner(System.in);

        int p,q,r;

        p = in.nextInt();
        q = in.nextInt();
        r = in.nextInt();

        int ans = 0;
        if(p<=q && p<=r)
        {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        }
        else if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        }

        System.out.print(ans);
    } main {
        Scanner in = new Scanner(System.in);

        int p,q,r;

        p = in.nextInt();
        q = in.nextInt();
        r = in.nextInt();

        int ans = 0;
        if(p<=q && p<=r)
        {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        }
        else if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        }

        System.out.print(ans);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int p p q q r; r p = in.nextInt() p in.nextInt() in.nextInt in q = in.nextInt() q in.nextInt() in.nextInt in r = in.nextInt() r in.nextInt() in.nextInt in int ans = 0; ans 0 if(p<=q && p<=r)
        {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        }
        else if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        } p<=q && p<=r p<=q p q p<=r p r {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        } if(q<=r)
                ans = p+q;

            else
                ans = p+r; q<=r q r ans = p+q ans p+q p q ans = p+r ans p+r p r if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        } q<=p && q<=r q<=p q p q<=r q r {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        } if(p<=r)
                ans = q+p;
            else
                ans = q+r; p<=r p r ans = q+p ans q+p q p ans = q+r ans q+r q r {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        } if(q<=p)
                ans = r+q;
            else
                ans = r+p; q<=p q p ans = r+q ans r+q r q ans = r+p ans r+p r p System.out.print(ans) System.out.print System.out System System.out ans String args[] args

// problem: "https://atcoder.jp/contests/abc129/tasks/abc129_a"

import java.util.Scanner;

class Main {
    public static void main (String args[]) {
        Scanner in = new Scanner(System.in);

        int p,q,r;

        p = in.nextInt();
        q = in.nextInt();
        r = in.nextInt();

        int ans = 0;
        if(p<=q && p<=r)
        {
            if(q<=r)
                ans = p+q;

            else
                ans = p+r;
        }
        else if(q<=p && q<=r)
        {
            if(p<=r)
                ans = q+p;
            else
                ans = q+r;
        }
        else
        {
            if(q<=p)
                ans = r+q;
            else
                ans = r+p;
        }

        System.out.print(ans);
    }
}
