#include using namespace std; #define INF_LL (ll)1e18 #define INF (int)1e9 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) #define all(x) x.begin(),x.end() #define fs first #define sc second using ll = long long; using PII = pair; using PLL = pair; const double eps = 1e-10; templateinline void chmin(A &a, B b){if(a > b) a = b;} templateinline void chmax(A &a, B b){if(a < b) a = b;} int main(void){ cin.tie(0); ios::sync_with_stdio(false); int a, b; double s; char c; scanf("%d %d %c%c%c%lf", &a, &b, &c, &c, &c, &s); int d = (s-9)*60; int now = (a*60+b+d+60*24)%(60*24); cout << setfill('0') << setw(2) << now/60 << ":"; cout << setfill('0') << setw(2) << now%60 << endl; }