PROGRAM RepeatExample(Input, Output);
    { Program 4.4 - compute the Nth partial sum of the
        harmonic series H(N) = 1 + 1/2 + 1/3 + ... + 1/N
        using a repeat statement for iteration. }
    VAR
        N: Integer;
        H: Real;
BEGIN
    Read(Input, N);
    Write(Output, N);

    H := 0;
    REPEAT
        H := H + 1/N;
        N := N - 1
    UNTIL N = 0;
    WriteLn(Output, H);
END.
