#include <iostream>
#include <iomanip>
#include <vector>
#include <utility>
#include <map>
#include <algorithm>
#include <queue>
#include <cmath>
#include <numeric>

using namespace std;
struct aaa{aaa(){cin.tie(nullptr); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20);};}aaa;

typedef long long int64;


int main() {
    int a,b,c;
    int ans = 0;
    cin >> a >> b >> c;
    if ((a<b&&c<b) || (b<a&&b<c)) {
        ans = abs(a-b);
        ans = min(ans, abs(c-b));
        ans = min(ans, abs(a-c));
    }

    cout << ans << endl;
}