#include using namespace std; int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ int a,b,c;char e;cin>>a>>e>>b>>e>>c; if(!(a%4)){ if(!(!(a%100) && (a%400))){ month[1]+=1; } } c+=2; if(month[b-1] < c){ b++; c-=month[b-2]; } if(12 < b){ a++; b-=12; } cout << a << e << (b<10?"0":"") << b << e << (c<10?"0":"") << c << endl; }