Description

There are n bulbs initially off. For round i, you toggle every ith bulb. After n rounds, how many bulbs are on?

Examples

Input:n = 3
Output:1
Explanation:

Only bulb 1 remains on.

Input:n = 0
Output:0
Explanation:

Edge case returning zero.

Input:n = 1
Output:1
Explanation:

Edge case with minimal input.

Constraints

  • 0 ≤ n ≤ 10⁹

Ready to solve this problem?

Practice solo or challenge other developers in a real-time coding battle!