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