#include <stdio.h>

int foo(int y) {
    int x = 1;
    while (y > 0) {
        if (y == 10) break;
        else if (y == 3) {
            y--; continue;
        }
        x = x * y;
        y--;
    }
    return x;
}

int main(void) {
    int i;
    while (1) {
      printf("y = ? ");
      scanf("%d", &i);
      if (i < 0) break; 
      printf("foo(%d) = %d\n", i, foo(i));
    }   
    return 0;
}
