//Normal #define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; void print(auto a){ cout << a; } void prints(auto a){ cout << a << " "; } void prints(){ cout << " "; } void printl(auto a){ cout << a << endl; } void printl(){ cout << endl; } void fix(int n){ cout << fixed << setprecision(n); } int main(){ string T; cin >> T; int t1 = (int)T.size(); int t2 = (int)T.find(":"); int H = stoi(T.substr(0, t2)); int M = stoi(T.substr(t2+1, t1)); if(M >= 55){ H = (H+1)%24; M -= 55; }else{ M += 5; } printf("%02d:%02d\n", H, M); return 0; }