#include #include #include #include int main(void){ int h,m; scanf("%d:%d", &h,&m); int up = 0; if(m >= 55){ up = 1; } if(up){ if(h == 23){ h = 0; }else{ h += 1; } m = (m+5) - 60; }else{ m += 5; } int h0 = 0; int m0 = 0; if(h < 10){ h0 = 1; } if(m < 10){ m0 = 1; } if(h0 == 1 && m0 == 1){ printf("0%d:0%d\n", h, m); }else if(h0 == 1 && m0 != 1){ printf("0%d:%d\n", h, m); }else if(h0 == 0 && m0 == 1){ printf("%d:0%d\n", h, m); }else{ printf("%d:%d\n", h, m); } return 0; }