      IDENTIFICATION DIVISION.
      PROGRAM-ID. 103A.
      DATA DIVISION.
      WORKING-STORAGE SECTION.
      01 INP PIC X(100).
      01 A1 PIC 9(3).
      01 A2 PIC 9(3).
      01 A3 PIC 9(3).
      01 WK1 PIC 9(3).
      01 WK2 PIC 9(3).
      01 WK3 PIC 9(3).
      01 ANS PIC ZZ9.
      
      PROCEDURE DIVISION.
      ACCEPT INP.
      
      UNSTRING INP DELIMITED BY " "
      INTO A1 A2 A3.
      EVALUATE TRUE
      WHEN ( A1 > A2 ) AND ( A1 > A3 )
      		MOVE A1 TO WK1
      		IF A2 > A3
      			MOVE A2 TO WK2
      			MOVE A3 TO WK3
      		ELSE 
      			MOVE A3 TO WK2
      			MOVE A2 TO WK3
      		END-IF
      WHEN ( A2 > A1 ) AND ( A2 > A3 )
      		MOVE A2 TO WK1
      		IF A1 > A3
      			MOVE A1 TO WK2
      			MOVE A3 TO WK3
			ELSE
      			MOVE A3 TO WK2
      			MOVE A1 TO WK3
			END-IF      
      WHEN ( A3 > A1 ) AND ( A3 > A2 )
      		MOVE A3 TO WK1
      		IF A1 > A2
      			MOVE A1 TO WK2
      			MOVE A2 TO WK3
			ELSE
      			MOVE A2 TO WK2
      			MOVE A1 TO WK3
			END-IF      
      END-EVALUATE.
      
      COMPUTE ANS = ( WK1 - WK2 ) + ( WK2 - WK3 )

      DISPLAY ANS.
      
      STOP RUN.