PROGRAM-ID.                      ABC_108_A.
DATA                             DIVISION.
WORKING-STORAGE                  SECTION.
    01 K       PIC 9(3).
    01 D       PIC 9(3).
    01 X       PIC 9(6).

    01 ans     PIC X(6).

    01 ZS      PIC Z(6)9.
    01 DUMMY   PIC X(1).

PROCEDURE                        DIVISION.
    ACCEPT K.

    DIVIDE 2 INTO K GIVING D.

    COMPUTE X = D * (K - D).

    MOVE X 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.
