#include int a[] = {1000000, 355065, 153009, 70685, 33758, 16414, 8065, 3988, 1979, 985, 491, 245, 122, 61, 30, 15, 7, 3, 1}; int main() { int n; scanf("%d", &n); n -= 2; printf("%d\n", (n < 10 ? a[n] : 0)); return 0; }