#include "stdio.h"
main ()
{
int year, month, day;
int total;
int leap;
printf ("enter year.month.day\n");
scanf ("%d.%d.%d.", &year, &month, &day);
switch (month)
{
case 1: total=0+day; break;
case 2: total=31+day; break;
case 3: total=59+day; break;
case 4: total=90+day; break;
case 5: total=120+day; break;
case 6: total=151+day; break;
case 7: total=181+day; break;
case 8: total=212+day; break;
case 9: total=243+day; break;
case 10: total=273+day; break;
case 11: total=304+day; break;
case 12: total=334+day; break;
}
leap=year%4==0&&year%100!=0||year%400==0;
if (leap)
total++;
printf ("%d", total);
getch ();
}