IDENTIFICATION                   DIVISION.
PROGRAM-ID.                      ABC_095_A.
ENVIRONMENT                      DIVISION.
DATA                             DIVISION.
WORKING-STORAGE                  SECTION.
    01 INP    PIC X(10).
    01 K      PIC 9(2).

    01 maxlen PIC 9(1)  VALUE 3.

    01 i      PIC 9(18) VALUE 1.
    01 j      PIC 9(18).
    01 len    PIC 9(2)  VALUE 1.

    01 x      PIC 9(4).

    01 ans    PIC X(4).
    01 ZS     PIC Z(5).
    01 S1.
        03 S11 OCCURS 3.
            05 S PIC X(1).

    01 DUMMY  PIC X(1).

PROCEDURE                        DIVISION.
MAIN.
    ACCEPT INP.

    PERFORM maxlen TIMES

        MOVE INP(i:len) TO S11(i)

        ADD 1 TO i

    END-PERFORM.

    MOVE 700 TO x.
    PERFORM VARYING j FROM 1 BY 1 UNTIL 3 < j
        IF S(j) = 'o' THEN
           ADD 100 TO x
        END-IF
    END-PERFORM.

    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
    END-UNSTRING.
