h,m=map(int,input().split(':')) print(str((h+1*(5+m>59))%24).zfill(2)+':'+str((5+m)%60).zfill(2))