#include #include using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int sorted[] = {a, b, c}; sort(sorted, sorted + 3); int cnt = 0; if (sorted[1] == a || sorted[1] == c) { cnt = min(sorted[1] - sorted[0], sorted[2] - sorted[1]); } cout << cnt << endl; return 0; }