#!/usr/bin/env python3

import sys

def solve(aOne, aTwo, aThree):
    (x, y, z) = sorted([aOne, aTwo, aThree])
    print((z - y) + (y - x))

def readQuestion():
    ws = sys.stdin.readline().strip().split()
    aOne = int(ws[0])
    aTwo = int(ws[1])
    aThree = int(ws[2])
    return (aOne, aTwo, aThree,)

def main():
    solve(*readQuestion())

main()
