PROGRAM-ID.                      ABC_043_A.
DATA                             DIVISION.
WORKING-STORAGE                  SECTION.
    01 N       PIC 9(3).
    01 tmp     PIC 9(4).
    01 ZS      PIC Z(5).
    01 ans     PIC X(18).
    01 DUMMY   PIC X(1).

PROCEDURE                        DIVISION.
    ACCEPT N.

    COMPUTE tmp = N * (N + 1) / 2.

    MOVE tmp TO ZS.

    PERFORM UNANS.

    DISPLAY ans(1:FUNCTION STORED-CHAR-LENGTH(ans)).
    STOP RUN.

UNANS                            SECTION.
    UNSTRING
        ZS DELIMITED BY ALL SPACE
        INTO DUMMY ans
    END-UNSTRING.
