IDENTIFICATION DIVISION.
PROGRAM-ID. BUDARKASSI1.

DATA DIVISION.
    WORKING-STORAGE SECTION.
       01 N   PIC S9(3).
       01 SM  PIC S9(6).
       01 NXT PIC S9(4).
       01 ANS PIC  Z(6).

PROCEDURE DIVISION.
    ACCEPT N.
    PERFORM N TIMES
       ACCEPT NXT
       ADD NXT TO SM GIVING SM
    END-PERFORM.
    
    MOVE SM TO ANS.
    DISPLAY ANS.
