#include using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) #define ALL(n) begin(n),end(n) struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { string H, M; REP( i, 5 ) { char T; cin >> T; if( i == 2 ) continue; i <= 1 ? H += T : M += T; } int h = stoi( H ); int m = stoi( M ); int m_res{ m + 5 }, h_res{ h }; if( m_res >= 60 ) { m_res = ( m + 5 ) % 60; h_res++; } if( h > 24 ) { h_res = h_res % 24; } string hh = to_string( h_res ); string mm = to_string( m_res ); cout << ( h_res == 24 ? "00" : hh.size() == 1 ? "0" + hh : hh ) << ":" << ( m_res == 60 ? "00" : mm.size() == 1 ? "0" + mm : mm ) << endl; return 0; }