#include using namespace std; int main(){ int a, b; double utc; scanf("%d %d UTC%lf", &a, &b, &utc); utc = utc - 9.0; int now = a*60 + b; now += utc*60; now %= (60*24); a = now/60; b = now - 60*a; cout << (a < 10 ? "0" : "") << a << ":" << (b < 10 ? "0" : "") << b << endl; return 0; }