#include <iostream>
#include <cmath>
using namespace std;

int main(){
    long double d;
    cin >> d;
    cout.precision(12);
    cout << fixed;
    cout << max((floor(d)+1),d*sqrt(2)) << endl;
    return 0;
}