#include
int day_of_year(int month, int day, int year);
int main()
{
int m, d, y;
while (scanf("%d %d %d", &m, &d, &y) != EOF)
{
printf("%d\n", day_of_year(m, d, y));
}
return 0;
}
/* 你的代码将被嵌在这里 */
int day_of_year(int month, int day, int year)
{
int p[4]={31,28,29,30},i,sum=0;
for(i=1;i { if(i==2&&year%4==0) sum+=p[2]; else if(i==2&&year%4!=0) sum+=p[1]; else if(i%2!=0&&i!=2&&i<=7) sum+=p[0]; else if(i%2==0&&i!=2&&i<8) sum+=p[3]; else if(i%2==0&&i>=8) sum+=p[0]; else if(i%2!=0&&i>8) sum+=p[3]; } return sum+=day; }