#include #include using namespace std; int main(){ string t; cin >> t; string temp; string h; string m; //まずは:を除いたstring型を成形 temp = t[0]; h = temp; temp = t[1]; h += temp; temp = t[3]; m = temp; temp = t[4]; m += temp; //整数に変換 int min, hour; min = stoi(m); hour = stoi(h); min += 5; if(min >= 60){ min = min-60; hour += 1; if(hour >= 24){ hour = 0; } } if(min < 10 && hour < 10) cout << "0" << hour << ":" << "0" << min << endl; else if(min < 10) cout << hour << "0" << ":" << min << endl; else if(hour < 10) cout << "0" << hour << ":" << min << endl; else cout << hour << ":" << min << endl; return 0; }