      IDENTIFICATION DIVISION.
      PROGRAM-ID. 103A.
      DATA DIVISION.
      WORKING-STORAGE SECTION.
      01 INP PIC X(100).
      01 A-TBL.
      	03 AX PIC 9(3) OCCURS 3 TIMES.
      01 IDX PIC 9(1).
      01 ANS PIC ZZ9.
      
      PROCEDURE DIVISION.
      ACCEPT INP.
	  UNSTRING INP DELIMITED BY " "
      INTO AX(1) AX(2) AX(3).
      
      SORT AX DESCENDING KEY AX.

      COMPUTE ANS = ( AX(1) - AX(2) ) + ( AX(2) - AX(3) )
      
      DISPLAY FUNCTION TRIM(ANS).
      
      STOP RUN.