#include <iostream>
using namespace std;
int main()
{
int a, b, c;
int out = 0;
while (cin >> a >> b >> c) { // 注意 while 处理多个 case
if (a % 4 == 0 && a % 100 != 0)
{
while (b--)
{
if (b == 1)
{
out += 31;
}
else if (b == 2)
{
out += 29;
}
else if (b == 3)
{
out += 31;
}
else if (b == 4)
{
out += 30;
}
else if (b == 5)
{
out += 31;
}
else if (b == 6)
{
out += 30;
}
else if (b == 7)
{
out += 31;
}
else if (b == 8)
{
out += 31;
}
else if (b == 9)
{
out += 30;
}
else if (b == 10)
{
out += 31;
}
else if (b == 11)
{
out += 30;
}
else if (b == 12)
{
out += 31;
}
}
out += c;
cout << out;
}
else
{
while (b--)
{
if (b == 1)
{
out += 31;
}
else if (b == 2)
{
out += 28;
}
else if (b == 3)
{
out += 31;
}
else if (b == 4)
{
out += 30;
}
else if (b == 5)
{
out += 31;
}
else if (b == 6)
{
out += 30;
}
else if (b == 7)
{
out += 31;
}
else if (b == 8)
{
out += 31;
}
else if (b == 9)
{
out += 30;
}
else if (b == 10)
{
out += 31;
}
else if (b == 11)
{
out += 30;
}
else if (b == 12)
{
out += 31;
}
}
out += c;
cout << out;
}
}
}
// 64 位输出请用 printf("%lld")
先if判断闰年,再用while循环计算月份的天数最后加上日期的天数