#include using namespace std; int main() { int A, B; scanf("%d:%d", &A, &B); int S = A * 60 + B + 5; printf("%02d:%02d\n", S / 60 % 24, S % 60); }