// #define _GLIBCXX_DEBUG #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input int h, m; scanf("%d:%d", &h, &m); // Calculate int time = (60 * h + m + 5) % 1440; int hour = time / 60; int minute = time % 60; // Output cout << setw(2) << setfill('0') << hour; cout << ':'; cout << setw(2) << setfill('0') << minute; cout << '\n'; }