#include using namespace std; int main(){ int a, b; string t; cin >> a >> b >> t; double utc = stod(t.substr(3, t.size())) - 9.0; int difmin = utc*60; b += difmin; if(b >= 60){ a += b/60; b -= b/60 * 60; }else if(b < 0){ while(b < 0){ a--; b += 60; } } if(a < 0) a += 24; if(a > 24) a -= 24; cout << (10 > a ? "0" : "") << a << ":" << (10 > b ? "0" : "") << b << endl; return 0; }