#include<iostream>
using namespace std;
int main(){
int x,y,z,h,day;
cin>>x>>y>>z;
if(y==2&&z==29){
cout<<-1;
}else{
h=x%4;
if(y>2){
if(h==0||h==1){
day=365*18+4;
cout<<day;
}else{
day=365*18+5;
cout<<day;
}
}else{
if(h==0||h==1){
day=365*18+3;
cout<<day;
}else{
day=365*18+4;
cout<<day;
}
}
}
}
11-05
02-07
01-04
616
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)