import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;

struct Spl{auto r="".splitter;auto rd(){r=readln.splitter;}auto bd(T)(ref T t){t=r.front.to!T;r.popFront;}}
auto _s = Spl();
auto getV(T...)(ref T t){foreach(ref u;t)_s.bd(u);}
auto getA(T)(size_t n,ref T t){t=new T(n);foreach(ref u;t)_s.bd(u);}
auto readV(T...)(ref T t){_s.rd; getV(t);}

void main()
{
  int p, q, r; readV(p, q, r);
  writeln(min(p+q, q+r, r+p));
}
