>>300 C
Wikipedia を見て

#include <stdio.h>
#include <math.h>
#define P (sqrt(5) / 2 + 0.5)

void f(int n) {
printf("%.f\n", pow(P, 2 - P) * pow(n, P - 1));
}

int main() {
f(10); // 5
f(100); // 21
f(1000); // 86
return 0;
}