summaryrefslogblamecommitdiffstats
path: root/inf/zotksd/3.c
blob: b7723b1ee7c19d805be03b28d4ca662f4f8c54ae (plain) (tree)





















                                                          
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define ABS(x) ((x) > 0 ? (x) : -(x))
#define N unsigned long long int
int main (void) {
	char buf[512];
	fgets(buf, 512, stdin);
	N n = strtoull(buf, NULL, 10);
	N num = 0;
	for (N i = 1; i < ceill(sqrtl(n)); i++) {
		if (n % i)
			continue;
		if (ABS(i-n/i) % 2)
			continue;
		num++;
#ifndef EVAL
		fprintf(stderr, "(%llu, %llu)\n", i, n/i);
#endif
	}
	printf("%llu\n", num);
}