IDENTIFICATION DIVISION.
PROGRAM-ID. ADD.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 Idx PICTURE 9(4).
77 Sum PICTURE 9(6).
77 X PICTURE X.
PROCEDURE DIVISION.
BEGIN.
ACCEPT X.
MOVE ZERO TO IDX.
MOVE ZERO TO SUM.
PERFORM ADD UNTTI TDX = 1001.
SURFTlRJRklDQVRJT04gRElWSVNJT04uClBST0dSQU0tSUQuIEFERC4KRU5WSVJPTk1FTlQgRElWSVNJT04uCkRBVEEgRElWSVNJT04uCldPUktJTkctU1RPUkFHRSBTRUNUSU9OLgo3NyBJZHggUElDVFVSRSA5KDQpLgo3NyBTdW0gUElDVFVSRSA5KDYpLgo3NyBYICAgUElDVFVSRSBYLgpQUk9DRURVUkUgRElWSVNJT04uCkJFR0lOLgogICAgQUNDRVBUIFguCiAgICBNT1ZFIFpFUk8gVE8gSURYLgogICAgTU9WRSBaRVJPIFRPIFNVTS4KICAgIFBFUkZPUk0gQUREIFVOVFRJIFREWCA9IDEwMDEu