#include int main() { std::stringstream ss; std::string s; int k = 0; int a[2] {}; while(ss>>s) { if(s == ":") { k++; } else { std::cin >> a[k]; } } int b = a[0] * 60 + a[1] + 5; printf("%02d:02d\n", b/60%24, a[1]%60); }