import java.io.*;
import java.util.*;
public class Main {
public static void main
(String[] args
) { Scanner in
= new Scanner
(System.
in);
long n = in.nextLong();
long q = 0;
for (int m = 1; m <= n; m++)
if (n / m == n % m)
q += 1;
out.print(q);
out.flush();
}
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC4qOwogCnB1YmxpYyBjbGFzcyBNYWluIHsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKCQlTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlQcmludFdyaXRlciBvdXQgPSBuZXcgUHJpbnRXcml0ZXIoU3lzdGVtLm91dCk7CgkJCgkJbG9uZyBuID0gaW4ubmV4dExvbmcoKTsKCQlsb25nIHEgPSAwOwoJCWZvciAoaW50IG0gPSAxOyBtIDw9IG47IG0rKykKCQkJaWYgKG4gLyBtID09IG4gJSBtKQoJCQkJcSArPSAxOwoJCW91dC5wcmludChxKTsKCQkKCQlvdXQuZmx1c2goKTsKCX0KfQ==