#include #include #include #include #include #include using namespace std; int main() { int a, b; string s; cin >> a >> b >> s; int x = (a + 24) * 60 + b; x += (int)(atof(s.data() + 3) * 60) - 9 * 60; printf("%02d:%02d\n", x / 60 % 24, x % 60); }