#include<stdio.h>
int s[5];
int main ()
{
    int p,q,r;
    scanf("%d%d%d",&p,&q,&r);
    s[1]=p+q;
    s[2]=p+r;
    s[3]=q+r;
    int minn=500;
    for (int i=1;i<=3;i++)
    {
        if (s[i]<minn)
            minn=s[i];
    }
    printf("%d\n",minn);
}
