#include "bits/stdc++.h" using namespace std; int main() { int H, M; char c; cin >> H >> c >> M; M += 5; if (M >= 60) M -= 60, H++; H = H % 24; cout << setw(2) << setfill('0') << H << ":" << setw(2) << setfill('0') << M << endl; }