       *> 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      PIC 9(5).
                     05 sp     PIC X.
                     05 b      PIC 9(5).
              01 Answer-Values.
                     05 disp   PIC Z(4)9.
                     05 ans    BINARY-SHORT.
       PROCEDURE DIVISION.
       AnswerMain SECTION.
       000-Start.
       
              ACCEPT Input-Values.
       
       001-LoopHead.
              IF a(1:1) = a(5:1) AND a(2:1) = a(4:1) THEN
                    ADD 1 TO ans
              END-IF.
              ADD 1 TO a.
              IF a > b THEN
                     GO TO 002-OutputAnswer
              END-IF.
              GO TO 001-LoopHead.
      
       002-OutputAnswer.
      	      MOVE ans TO disp.
              DISPLAY TRIM(disp).
              
       END PROGRAM Answer.
