#include using namespace std; int main(){ int a,b; scanf("%d:%d",&a,&b); if(b+5>=60){ if(a==23)cout << "00:"; else{ cout.width(2); cout.fill('0'); cout << a+1 << ":"; } cout << '0' << b-55 << endl; }else{ cout.width(2); cout.fill('0'); cout << a << ":"; cout.width(2); cout.fill('0'); cout << b+5 << endl; } return 0; }