#include #include #include #include #include #define rep(i, a, n) for(int i = a;i < n;i++) #define repr(i, a, n) for(int i = a;i > n;i--) using namespace std; int a, b; string s; int t; double utc; void input(){ cin >> a >> b >> s; string s1; rep(i, 3,(int)s.size()) s1.push_back(s[i]); stringstream ss; ss << s1; ss >> utc; } void solve(){ t = a*60 + b; t += (int)((utc - 9.0)*60); int h = (int)(t/60 + 24) % 24; int m = t % 60; cout << setfill('0') << setw(2) << h << ':'; cout << setfill('0') << setw(2) << m << endl; } int main(){ input(); solve(); return 0; }