var line=readline() var year=parseInt(line.split(' ')[0]) var month=parseInt(line.split(' ')[1]) var date=parseInt(line.split(' ')[2]) var sum=0 var arr=[31,28,31,30,31,30,31,31,30,31,30,31] if(year%100===0){ if(year%400===0){ arr[1]=29 } }else if(year%4===0){ arr[1]=29 }else{ arr[1]=28 } for(let i=0;i<month-1;i++){ sum+=arr[i] } sum=sum+date console.log(sum)