#include using ll = long long; using llu = long long unsigned; using namespace std; int main() { vector kado(3); for (int i=0; i<3; i++) { cin >> kado[i]; } sort(kado.begin(), kado.end()); int ret = min(kado[2]-kado[1], kado[1]-kado[0]); cout << ret << endl; return 0; }