#include using namespace std; int main() { string s; cin >> s; int h = (s[0]-'0')*10+(s[1]-'0'); int m = (s[3]-'0')*10+(s[4]-'0'); if(m<=54){ cout << h << ":" << m+5 << endl; }else{ cout << (h+1)%24 << ":" << (m+5)%60 << endl; } }