000010 IDENTIFICATION                   DIVISION.
000020 PROGRAM-ID.                      ABC-147-A.
000030 AUTHOR.                          CUNITAC.
000040 DATE-WRITTEN.                    2019/12/13.
000060*
000070 ENVIRONMENT                      DIVISION.
000075*
000080 DATA                             DIVISION.
000090 WORKING-STORAGE                  SECTION.
000100 01 S   PIC 99 VALUE 0.
000110 01 A   PIC 99.
000120 01 INP PIC X(9).
000125 01 P1  PIC 9 VALUE 1.
000128 01 P2  PIC 9. 
000130*
000140 PROCEDURE                        DIVISION.
000150 MAIN.
000160  ACCEPT INP.
000170  PERFORM 3 TIMES
000180   PERFORM VARYING P2 FROM 1 BY 1
000190       UNTIL INP(P1 + P2:1) = SPACE
000200   END-PERFORM
000210   MOVE INP(P1:P2) TO A
000215   ADD P2+1 TO P1
000220   ADD A TO S
000230  END-PERFORM.
000240  IF S >= 22 THEN
000250   DISPLAY "bust"
000260  ELSE
000270   DISPLAY "win"
000280  END-IF.
000250  STOP RUN.