import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc=new Scanner(System.in); long n=sc.nextLong()/1000; long x=n%86400; //System.out.print(x); long ans1=x/3600;//小时数 long ans2=x-ans1*3600; long ans3=ans2/60;//分钟数 long ans4=ans2-ans3*60;//秒数 if(ans1<10) System.out.print("0"); System.out.print(ans1); System.out.print(":"); if(ans3<10) System.out.print("0"); System.out.print(ans3); System.out.print(":"); if(ans4<10) System.out.print("0"); System.out.print(ans4); } }