#include using namespace std; using ll = long long; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); vector a(3), b; for (int i = 0; i < 3; ++i) { cin >> a[i]; } b = a; sort(b.begin(), b.end()); ll ans = 1e15; if (b[0] == a[1]) { ans = min(ans, b[1] - b[0]); } if (b[2] == a[1]) { ans = min(ans, b[2] - b[1]); } cout << ans << endl; return 0; }