#include #include #include using namespace std; int main(){ int x; string unko; cin >> unko; for(int i = 0;i < 5;++i){ if( i != 2) unko[i]-=48; } unko[4] += 5; if(unko[4] > 9){ unko[4] -=10; unko[3] += 1; } if(unko[3] >= 6){ unko[3] -= 6; unko[1] += 1; } if(unko[1] > 10){ unko[1] -= 10; unko[0] += 1; } if(unko[0] * 10 + unko[1] >= 24){ unko[0] -= 2; unko[1] -= 4; } for(int i = 0; i < 5;++i){ if(i!= 2) unko[i]+=48; cout << unko[i]; } cout << endl; }