#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
    double d;
    cin >> d;
    double ans = d * sqrt(2);
    cout << fixed << setprecision(10);
    cout << max(ans, (double)((int)d + 1)) << endl;
    return 0;
}
