program excursion2;
var
A, F, M, S, W : LongInt;
begin
{ assign(input, 'input.txt'); reset(input);
assign(output, 'output.txt'); rewrite(output);}
ReadLn(A);
ReadLn(F);
ReadLn(M);
S := 2*M+3*F+A;
W := M+F+a;
WriteLn(S);
WriteLn(W);
end.
cHJvZ3JhbSBleGN1cnNpb24yOwp2YXIKICAgIEEsIEYsIE0sIFMsIFcgOiBMb25nSW50OwoKYmVnaW4KeyAgIGFzc2lnbihpbnB1dCwgICdpbnB1dC50eHQnKTsgIHJlc2V0KGlucHV0KTsKICAgIGFzc2lnbihvdXRwdXQsICdvdXRwdXQudHh0Jyk7IHJld3JpdGUob3V0cHV0KTt9CgogICAgUmVhZExuKEEpOwoKICAgIFJlYWRMbihGKTsKCiAgICBSZWFkTG4oTSk7CgogICAgUyA6PSAyKk0rMypGK0E7CiAgICBXIDo9IE0rRithOwogICAgV3JpdGVMbihTKTsKICAgIFdyaXRlTG4oVyk7CgplbmQuCg==