#include using namespace std; #define SZ(x) (int)(x.size()) using ll = long long; using ld = long double; using P = pair; using vi = vector; using vvi = vector>; using vll = vector; using vvll = vector>; const double eps = 1e-10; const int MOD = 1000000007; const int INF = 1000000000; const ll LINF = 1ll<<50; template void printv(const vector& s) { for(int i=0;i<(int)(s.size());++i) { cout << s[i]; if(i == (int)(s.size())-1) cout << endl; else cout << " "; } } int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(10); ll a, b, c; cin >> a >> b >> c; ll ans = 0; if(max(a, max(b, c)) == b && min(a, min(b, c)) == c) { ans = min(b - a, a - c); } else if (max(a, max(b, c)) == c && min(a, min(b, c)) == b) { ans = min(c - a, a - b); } else if (max(a, max(b, c)) == b && min(a, min(b, c)) == a) { ans = min(b - c, c - a); } else if (max(a, max(b, c)) == a && min(a, min(b, c)) == b) { ans = min(a - c, c - b); } cout << ans << endl; }