#include <bits/stdc++.h>

using namespace std;

int main()
{
  double d; cin >> d;
  double ans = d*sqrt(2);
  for(double x = 0.0; x <= d; x += 1.0) {
    double y = max(sqrt(d*d - x*x), 1.0);
    ans = max(ans, x + y);
  }
  printf("%.10f\n", ans);
  
  return 0;
}