Program Zadacha1;
Var n: LongInt;
i: Integer;
r, a: Real;
Begin
Write('n = ');
ReadLn(n);
If n > 100000 Then
WriteLn('Ошибка!')
Else
Begin
r := 0;
For i := 0 To n Do
Begin
r := r + a;
a := (1 - (i and 1) shl 1) * (1 / Abs(i * 2 + 1));
End;
WriteLn('Результат: ', r);
End;
ReadLn;
End.