#include "bits/stdc++.h" #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } using namespace std; int main() { fastcin; int a, b; std::string S; cin >> a >> b >> S; S.erase(S.begin(), S.begin()+3); double diff = stod(S); int diffh = (int)diff - 9; double ddiffm = (diff - (int)diff); int diffm = ddiffm * 60; b += diffm; if(b > 59) { b -= 60; a++; } else if(b < 0) { b += 60; a--; } a += diffh; if(a > 23) { a -= 24; } else if(a < 0) { a += 24; } if(a < 10) { cout << "0"; } cout << a << ":"; if(b < 10) { cout << "0"; } cout << b << '\n'; return 0; }