IDENTIFICATION DIVISION.
PROGRAM-ID. 165B.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INP        PIC X(20).
01 X          PIC 9(18).
01 Y          PIC 9(18).
01 LEN        PIC 9(02).
01 I          PIC 9(04). 
01 OUT        PIC Z(3)9.
*>
PROCEDURE DIVISION.
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ' '
      INTO INP COUNT LEN.
*>
  IF (LEN <= 18)
    MOVE 0   TO OUT
    MOVE INP TO X
    MOVE 100 TO Y
    MOVE 1   TO I
    PERFORM VARYING I FROM 1 BY 1 UNTIL I > 3759 OR Y >= X
      COMPUTE Y = Y + Y * 0.01
    END-PERFORM
    COMPUTE OUT = I - 1
  ELSE
    MOVE 3760 TO OUT
  END-IF.
*>
  DISPLAY FUNCTION TRIM(OUT).
  STOP RUN.
