IDENTIFICATION DIVISION.
PROGRAM-ID. 134B.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INP PIC X(10).
01 N   PIC S9(2).
01 D   PIC 9(2).
01 K   PIC 9(2).
01 OUT PIC Z9.
*>
PROCEDURE DIVISION.
  ACCEPT INP.
  UNSTRING INP DELIMITED BY ' '
      INTO N D.
  MOVE 0 TO K.
  PERFORM UNTIL N <= 0
    COMPUTE N = N - (D * 2 + 1)
    ADD 1 TO K
  END-PERFORM.
*>
  MOVE K TO OUT.
  DISPLAY OUT.
*>
  STOP RUN.
      