      IDENTIFICATION DIVISION.
      PROGRAM-ID. 057A.
      DATA DIVISION.
      WORKING-STORAGE SECTION.
      01 INP PIC X(100).
      01 A   PIC 9(2).
      01 B   PIC 9(2).
      01 ANS1 PIC 9(2).
      01 ANS2 PIC 9(2).
      01 ANSX PIC Z(2).
      
      PROCEDURE DIVISION.
      ACCEPT INP.
      UNSTRING INP DELIMITED BY " "
      INTO A B.
      COMPUTE ANS1 = A + B.
      IF ANS1 >= 24
      	COMPUTE ANS2 = ANS1 - 24
      ELSE
      	MOVE ANS1 TO ANS2
      END-IF.
      MOVE ANS2 TO ANSX.
      DISPLAY FUNCTION TRIM(ANSX).
      
      STOP RUN.