#include using namespace std; #define REP(i,n) for(int i=0;i ostream& operator<<(ostream& os,const vector& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; } typedef long long ll; typedef unsigned long long ull; typedef pair pii; typedef vector vi; typedef vector vvi; int main(){ int a,b;cin>>a>>b; if(a==b){ double cc = sqrt(a*a+b*b); printf("%.20f\n",cc); return 0; } double c=sqrt(max(a,b)*max(a,b)-min(a,b)*min(a,b)); printf("%.20f\n",c); }