h,m=map(int,input().split(':')) mm=(m+5)%60 hh=(h+1)%24 if m>=55 else h print('{:02}:{:02}'.format(hh,mm))