#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int x, y;
cin >> x >> y;
double a = sqrt(5 * 5 + 5 * 5 - 4), // Tính đoạn OA
c = sqrt((x - 5) * (x - 5) + (y - 5) * (y - 5) - 4), // Tính đoạn BK
u = ((0 - 5) * (x - 5) + (0 - 5) * (y - 5)) // cos(OIK)
/ (sqrt(5 * 5 + 5 * 5) * sqrt((x - 5) * (x - 5) + (y - 5) * (y - 5))),
v = 2 / sqrt((0 - 5) * (0 - 5) + (0 - 5) * (0 - 5)), // cos(OIA)
w = 2 / sqrt((x - 5) * (x - 5) + (y - 5) * (y - 5)); // cos(BIK)
double phi = (acos(u) - acos(v) - acos(w)), // Tính góc phi = OIK - OIA - BIK
b = phi * 2; // Tính cung AB
double res = a + b + c; // OA + cung AB + BK
cout << fixed << setprecision(2) << res;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxpb21hbmlwPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4udGllKE5VTEwpOwoKICAgIGludCB4LCB5OwogICAgY2luID4+IHggPj4geTsKICAgIGRvdWJsZSBhID0gc3FydCg1ICogNSArIDUgKiA1IC0gNCksIC8vIFTDrW5oIMSRb+G6oW4gT0EKICAgICAgICAgICBjID0gc3FydCgoeCAtIDUpICogKHggLSA1KSArICh5IC0gNSkgKiAoeSAtIDUpIC0gNCksIC8vIFTDrW5oIMSRb+G6oW4gQksKICAgICAgICAgICB1ID0gKCgwIC0gNSkgKiAoeCAtIDUpICsgKDAgLSA1KSAqICh5IC0gNSkpIC8vIGNvcyhPSUspCiAgICAgICAgICAgICAgIC8gKHNxcnQoNSAqIDUgKyA1ICogNSkgKiBzcXJ0KCh4IC0gNSkgKiAoeCAtIDUp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