a=int(input()[:-1])*6+600 print('%02d:%02d'%(a//60%24,a%60))