1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include <cstdio>


int main() {
  int n;
  scanf("%d", &n);
  long long result = 0;
  for (int i = 1; i * i < n; ++i) {
    if (n % i == 0) {
      int p = n / i - 1;
      for (int j = 2; j < p / 2; ++j) {
        if (p % j == 0) ++result;
      }
    }
  }
  printf("%lld", result);
}