#include using namespace std; int main() { int a,b,c,ans; cin >> a >> b >> c; ans=min(abs(a-b),min(abs(b-c),abs(c-a))); cout << ans << endl; return 0; }