h,m = map(int, input().split(':')) print('{:02}'.format((h+m//60)%24), ':', '{:02}'.format((m+5)%60), sep='')