IDENTIFICATION DIVISION.
PROGRAM-ID. PROGRAM_ID.

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
   SELECT SYSIN ASSIGN TO KEYBOARD ORGANIZATION LINE SEQUENTIAL.

DATA DIVISION.
FILE SECTION.
FD SYSIN.
   01 INDATA  PIC X(200000).
WORKING-STORAGE SECTION.
01 S          PIC X(200000).
01 T          PIC X(200000).
01 i          PIC 9(10) COMP.
01 ans        PIC 9(10) VALUE ZERO COMP.
01 zs         PIC Z(9)9.

PROCEDURE DIVISION.
  OPEN INPUT SYSIN.
  READ SYSIN INTO INDATA.
  CLOSE SYSIN.
  MOVE INDATA TO S.
  OPEN INPUT SYSIN.
  READ SYSIN INTO INDATA.
  CLOSE SYSIN.
  MOVE INDATA TO T.
  PERFORM VARYING i FROM 1 BY 1 UNTIL FUNCTION STORED-CHAR-LENGTH(S) < i
    IF S(i : 1) <> T(i : 1)
      ADD 1 TO ans
    END-IF
  END-PERFORM.
  MOVE ans TO zs.
  DISPLAY FUNCTION TRIM(zs).
  STOP RUN.
