#include #include using namespace std; using ll = long long; int main() { int h, m, t; scanf("%d:%d", &h, &m); t = (h * 60 + m + 5) % (24 * 60); printf("%02d:%02d\n", t / 60, t % 60); }