Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/while-kvadratidan-kichik-bolmagan-son

Number whose square is at least n

Easy 1000 ms 64 MB 26%
Share

A positive integer $n$ is given. Find the smallest positive integer $k$ satisfying the inequality:

$$k^{2} \ge n$$

Finding the smallest number whose square is at least the given one

Input

One integer $n$.

Output

One integer — $k$.

Note

$1 \le n \le 10^{9}$

Examples

Input #1
26
Output #1
6
Input #2
16
Output #2
4

Sign in to submit a solution

Signing up is free and takes a minute.