eolymp
bolt
Try our new interface for solving problems
Problems

Mosaic

Mosaic

Petya has n square cards. He wants to create from them a large square (without holes). How many cards he has left?

Input

One integer n (1n109).

Output

Print the number of cards left.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1
Output example #1
0
Input example #2
27
Output example #2
2
Source Stage II Ukrainian School Olympiad 2011-2012, Berdichev