#include <iostream>
using namespace std;

int main(){
    string T;
    int m = 0; int h = 0;
    cin >> T;
    m = int(T[3]-'0')*10 + int(T[4]-'0') + 5;
    h = int(T[0]-'0')*10 + int(T[1]-'0');
    if(m/60==1){ h += 1; }
    if(m/60==1 && h/24==1){
        m%=60; h%=24;
        cout << "0" + to_string(h) << ":"<< "0" + to_string(m) << endl;
    }else if(m/60==1){
        m%=60;
        cout << to_string(h) << ":" << "0" + to_string(m) << endl;
    }else{
        cout << to_string(h) << ":" << to_string(m) << endl;
    }
    return 0;
}