uses crt; var h,m,k:integer; begin readln(k); m:=(45*k)+(5*(k-2)); h:=8+(m div 60); m:=m mod 60; write(h,':',m); end.