#include <iostream>
using namespace std;

int main(){
    int a = 0;
    int h = 0;
    int m = 0;
    scanf("%d:%d", &h, &m);
    a = h * 60 + m;
    a = (a + 5) % (24 * 60);
    printf("%02d:%02d\n",a/60,a%60);
    return 0;
}