#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b A){ ll L = A.size(); FOR(i, 0, L){ if(i) cout << ' '; cout << A[i]; } cout << endl; } int main(){ cin.tie(0); ios::sync_with_stdio(false); // input ll a, b; cin >> a >> b; string s; cin >> s; double d = stod(s.substr(3)); // pn(d); d -= 9; d += 24; d += 0.001; // 誤差 ll minutes = 60 * d; // pn(minutes); a += minutes / 60; b += minutes % 60; if(b>=60){ b -= 60; a += 1; } a %= 24; printf("%02d:%02d\n", a, b); return 0; }