#include #include using namespace std; int output(int h, int m){ if(h <= 9){ cout << 0 << h << ":"; }else{ cout << h << ":"; } if(m <= 9){ cout << 0 << m << endl; }else{ cout << m << endl; } } int main(){ string T; cin >> T; int h = (T[0] - '0') * 10 + (T[1] - '0'); int m = (T[3] - '0') * 10 + (T[4] - '0'); if(m >= 55){ if(h == 23){ output(0, m - 55); }else{ output(h + 1, m - 55); } }else{ output(h, m + 5); } }