#!/usr/bin/env python3 # † from math import isqrt def f(N): sq = isqrt(N) res = sq * 2 if N//sq == sq: res -= 1 return res ### if __name__ == '__main__': N = int(input()) res = f(N) print(res)