import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	} main {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int second = scan.nextInt(); second scan.nextInt() scan.nextInt scan if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		} second < 0 || second >= 86400 second < 0 second 0 second >= 86400 second 86400 {
			System.out.println("Error!");
		} System.out.println("Error!") System.out.println System.out System System.out "Error!" {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		} int hour = second/3600; hour second/3600 second 3600 int minute = (second - hour*3600)/60; minute (second - hour*3600)/60 (second - hour*3600) second hour*3600 hour 3600 60 System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60)) System.out.println System.out System System.out hour + ":" + minute + ":" + (second - hour*3600 - minute*60) ":" minute hour + ":" + minute + ":" + (second - hour*3600 - minute*60) hour ":" minute ":" (second - hour*3600 - minute*60) second - hour*3600 - minute*60 second hour*3600 hour 3600 minute*60 minute 60 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int second = scan.nextInt();
		if (second < 0 || second >= 86400) {
			System.out.println("Error!");
		} else {
			int hour = second/3600;
			int minute = (second - hour*3600)/60;
			System.out.println(hour + ":" + minute + ":" + (second - hour*3600 - minute*60));
		}
	}

}