#include
#include
int main()
{
char *a[] = {"鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"};
int year, y;
scanf("%d", &year);
y = year < 0 ? year + 1: year; // 注意:没有公元0年,公元前1年紧接着公元1年
while (y < 0) y += 12;
printf("公元%s%d年是%s年\n", year < 0 ? "前" : "", abs(year), a[(y+8)%12]);
return 0;
}