How many switches are ON A class has N student and the class room has N switches (all turned OFF and numbered 1 to N). Each student has an enrollment number assigned from 1 to N. Each student serially (by number) toggles the switches that has a number which is divisible by his/her enrollment number.

Example: Student 1 will turn all the switches ON. Student 2 will turn all even switches OFF. Student N just toggles the Nth switch.

Write a function that takes N as input as returns number of ON switches.
sample I/O

Input: 10
Output:3


No upper bound for N is given, but greater the scope, better the code. Shortest and innovative function wins
Python, 19 characters
f=lambda n:n**.5//1

Perfect squares are the only numbers with an odd number of divisors.
This used to be a 21-character answer:
f=lambda n:int(n**.5)

but since I originally wrote it in 2011, the floor-division // operator was introduced, which can replace the int call.
As a consequence, the answer is now returned as a floating-point number. (But f(10) == 3.0 is still a correct number of lockers!)