#include #include #include using namespace std; int main() { int A, B, C; cin >> A >> B >> C; if (A == B || A == C || B == C || (B != max({ A, B, C }) && B != min({ A, B, C }))) { cout << 0 << endl; } else { cout << min({ abs(A - B), abs(A - C), abs(B - C) }) << endl; } return 0; }