import java.io.*;

class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int S;
		do{
			S = Integer.parseInt(br.readLine());
		}while(!(0 <= S && S < 86400));

		int h,m,s;
		h = m = s = 0;
		while(S >= 3600){
			S -= 3600;
			h++;
		}
		while(S >= 60){
			S -= 60;
			m++;
		}
		s = S;

		System.out.println(h + ":" + m + ":" + s);
	}
} import java.io.*; io.* java class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int S;
		do{
			S = Integer.parseInt(br.readLine());
		}while(!(0 <= S && S < 86400));

		int h,m,s;
		h = m = s = 0;
		while(S >= 3600){
			S -= 3600;
			h++;
		}
		while(S >= 60){
			S -= 60;
			m++;
		}
		s = S;

		System.out.println(h + ":" + m + ":" + s);
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int S;
		do{
			S = Integer.parseInt(br.readLine());
		}while(!(0 <= S && S < 86400));

		int h,m,s;
		h = m = s = 0;
		while(S >= 3600){
			S -= 3600;
			h++;
		}
		while(S >= 60){
			S -= 60;
			m++;
		}
		s = S;

		System.out.println(h + ":" + m + ":" + s);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int S;
		do{
			S = Integer.parseInt(br.readLine());
		}while(!(0 <= S && S < 86400));

		int h,m,s;
		h = m = s = 0;
		while(S >= 3600){
			S -= 3600;
			h++;
		}
		while(S >= 60){
			S -= 60;
			m++;
		}
		s = S;

		System.out.println(h + ":" + m + ":" + s);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int S; S do{
			S = Integer.parseInt(br.readLine());
		}while(!(0 <= S && S < 86400)); !(0 <= S && S < 86400) (0 <= S && S < 86400) 0 <= S 0 S S < 86400 S 86400 {
			S = Integer.parseInt(br.readLine());
		} S = Integer.parseInt(br.readLine()) S Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int h h m m s; s h = m = s = 0 h m = s = 0 m s = 0 s 0 while(S >= 3600){
			S -= 3600;
			h++;
		} S >= 3600 S 3600 {
			S -= 3600;
			h++;
		} S -= 3600 S 3600 h++ h while(S >= 60){
			S -= 60;
			m++;
		} S >= 60 S 60 {
			S -= 60;
			m++;
		} S -= 60 S 60 m++ m s = S s S System.out.println(h + ":" + m + ":" + s) System.out.println System.out System System.out h + ":" + m + ":" + s ":" m h + ":" + m + ":" + s h ":" m ":" s String[] args args
import java.io.*;

class Main{
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int S;
		do{
			S = Integer.parseInt(br.readLine());
		}while(!(0 <= S && S < 86400));

		int h,m,s;
		h = m = s = 0;
		while(S >= 3600){
			S -= 3600;
			h++;
		}
		while(S >= 60){
			S -= 60;
			m++;
		}
		s = S;

		System.out.println(h + ":" + m + ":" + s);
	}
}