       *> AtCoder My Practice
       *> author: Leonardone @ NEETSDKASU
       *>
       IDENTIFICATION DIVISION.
       PROGRAM-ID. Answer.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       REPOSITORY.
              FUNCTION ALL INTRINSIC.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
              01 Input-Values.
                     05 a      BINARY-SHORT.
                     05 b      BINARY-SHORT.
                     05 c      BINARY-SHORT.
                     05 x      BINARY-SHORT.
              01 Calc-Values.
                     05 i      BINARY-SHORT.
                     05 j      BINARY-SHORT.
                     05 k      BINARY-SHORT.
                     05 tmp1   BINARY-SHORT.
                     05 tmp2   BINARY-SHORT.
                     05 ans    BINARY-SHORT.
                     05 disp   PIC Z(10)9.
       PROCEDURE DIVISION.
       AnswerMain SECTION.
       000-Start.
       
              ACCEPT a.
              ACCEPT b.
              ACCEPT c.
              ACCEPT x.
              
              PERFORM WITH TEST AFTER VARYING i
              FROM 0 BY 1 UNTIL i > a
      
              PERFORM WITH TEST AFTER VARYING j
              FROM 0 BY 1 UNTIL j > b

              PERFORM WITH TEST AFTER VARYING k
              FROM 0 BY 1 UNTIL k > c
              
              MOVE i TO tmp1
              MULTIPLY 500 BY tmp1
              MOVE j TO tmp2
              MULTIPLY 100 BY tmp2
              ADD tmp2 TO tmp1
              MOVE k TO tmp2
              MULTIPLY 50 BY tmp2
              ADD tmp2 TO tmp1
              IF tmp1 = x THEN
                     ADD 1 TO ans
              END-IF
              END-PERFORM
              END-PERFORM
              END-PERFORM.
               
              MOVE ans TO disp.
              DISPLAY TRIM(disp).
       END PROGRAM Answer.
