import java.util.Scanner;
public class day{ //记得修改文件名
public static void main(String[] args){
int y,m,d,sum;
sum=0;
Scanner sc=new Scanner(System.in);
System.out.println("请输入年份:");
y=sc.nextInt();
System.out.println("请输入月份:");
m=sc.nextInt();
System.out.println("请输入日:");
d=sc.nextInt();
switch(m)
{
case 12:sum+=30;
case 11:sum+=31;
case 10:sum+=30;
case 9:sum+=31;
case 8:sum+=31;
case 7:sum+=30;
case 6:sum+=31;
case 5:sum+=30;
case 4:sum+=31;
case 3:sum+=28;
case 2:sum+=31;
case 1:sum+=d;
}
if(m>2 && (y%400==0 || y%4==0 && y%100!=0))
sum+=1;
System.out.println("第"+sum+"天");
}
}