#pragma GCC optimize("Ofast") #include using namespace std; typedef long long ll; #define EPS (1e-7) #define INF (1e9) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) x.begin(),x.end() #define pii pair #define pll pair const double PI = acos(-1); const ll MOD = 1000000007; // const ll MOD = 998244353; template inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } /////////////////////////////////////////////////////////////// int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int A,B,C; cin >> A >> B >> C; cout << min({B-A,B-C,max(C-A,A-C)}) << endl; }