#include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#define EPS 1e-6
using namespace std;

int main() {
    long double d;
    cin >> d;
    
    long double sqrt2 = 1.414213562373;
    long double ans = max(d * sqrt2, (long double)((int)d + 1));
    printf("%.10Lf\n", ans);
    return 0;
}