Var
i,N:integer;
a,d,S,x,y,S1:real;
Begin
Write('N = ');ReadLn(N);
Write('x = ');ReadLn(x);
Write('y = ');ReadLn(y);
S:=0;
S1:=0;
a:=5;
d:=1.7;
For i:= 1 to N do
Begin
S:=S+a;
if a>x then
if a a:=a+d;
End;
WriteLn('S = ',S);
WriteLn('S1 = ',S1);
End.