import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.concurrent.TimeUnit;

/**
 *
 * @author yoshkur
 */
public class Main {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
}

class InputData {

	private Long second;

	public InputData(BufferedReader br) throws IOException {
		String line = br.readLine().trim();
		this.second = Long.parseLong(line);
	}

	public Long getSecond() {
		return this.second % TimeUnit.MINUTES.toSeconds(1);
	}
	
	public Long getMinute() {
		Long temp = (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1);
		return TimeUnit.SECONDS.toMinutes(temp);
	}
	
	public Long getHour() {
		Long temp = (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1);
		return TimeUnit.SECONDS.toHours(temp);
	}
	
	public String getTime() {
		StringBuilder sb = new StringBuilder();
		sb.append(this.getHour().toString());
		sb.append(":");
		sb.append(this.getMinute());
		sb.append(":");
		sb.append(this.getSecond());
		return sb.toString();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.concurrent.TimeUnit; TimeUnit java.util.concurrent public class Main {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
} Main public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	} main {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	} try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		} IOException | NumberFormatException e {
			System.err.println(e.getLocalizedMessage());
		} System.err.println(e.getLocalizedMessage()) System.err.println System.err System System.err e.getLocalizedMessage() e.getLocalizedMessage e {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) InputData inputData = new InputData(br); inputData new InputData(br) System.out.println(inputData.getTime()) System.out.println System.out System System.out inputData.getTime() inputData.getTime inputData String[] args args class InputData {

	private Long second;

	public InputData(BufferedReader br) throws IOException {
		String line = br.readLine().trim();
		this.second = Long.parseLong(line);
	}

	public Long getSecond() {
		return this.second % TimeUnit.MINUTES.toSeconds(1);
	}
	
	public Long getMinute() {
		Long temp = (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1);
		return TimeUnit.SECONDS.toMinutes(temp);
	}
	
	public Long getHour() {
		Long temp = (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1);
		return TimeUnit.SECONDS.toHours(temp);
	}
	
	public String getTime() {
		StringBuilder sb = new StringBuilder();
		sb.append(this.getHour().toString());
		sb.append(":");
		sb.append(this.getMinute());
		sb.append(":");
		sb.append(this.getSecond());
		return sb.toString();
	}
} InputData private Long second; second public InputData(BufferedReader br) throws IOException {
		String line = br.readLine().trim();
		this.second = Long.parseLong(line);
	} InputData {
		String line = br.readLine().trim();
		this.second = Long.parseLong(line);
	} String line = br.readLine().trim(); line br.readLine().trim() br.readLine().trim br.readLine() br.readLine br this.second = Long.parseLong(line) this.second this this.second Long.parseLong(line) Long.parseLong Long line BufferedReader br br public Long getSecond() {
		return this.second % TimeUnit.MINUTES.toSeconds(1);
	} getSecond {
		return this.second % TimeUnit.MINUTES.toSeconds(1);
	} return this.second % TimeUnit.MINUTES.toSeconds(1); this.second % TimeUnit.MINUTES.toSeconds(1) this.second this this.second TimeUnit.MINUTES.toSeconds(1) TimeUnit.MINUTES.toSeconds TimeUnit.MINUTES TimeUnit TimeUnit.MINUTES 1 public Long getMinute() {
		Long temp = (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1);
		return TimeUnit.SECONDS.toMinutes(temp);
	} getMinute {
		Long temp = (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1);
		return TimeUnit.SECONDS.toMinutes(temp);
	} Long temp = (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1); temp (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1) (this.second - this.getSecond()) this.second this this.second this.getSecond() this.getSecond this TimeUnit.HOURS.toSeconds(1) TimeUnit.HOURS.toSeconds TimeUnit.HOURS TimeUnit TimeUnit.HOURS 1 return TimeUnit.SECONDS.toMinutes(temp); TimeUnit.SECONDS.toMinutes(temp) TimeUnit.SECONDS.toMinutes TimeUnit.SECONDS TimeUnit TimeUnit.SECONDS temp public Long getHour() {
		Long temp = (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1);
		return TimeUnit.SECONDS.toHours(temp);
	} getHour {
		Long temp = (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1);
		return TimeUnit.SECONDS.toHours(temp);
	} Long temp = (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1); temp (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1) (this.second - this.getSecond() - this.getMinute()) this.second - this.getSecond() - this.getMinute() this.second this this.second this.getSecond() this.getSecond this this.getMinute() this.getMinute this TimeUnit.DAYS.toSeconds(1) TimeUnit.DAYS.toSeconds TimeUnit.DAYS TimeUnit TimeUnit.DAYS 1 return TimeUnit.SECONDS.toHours(temp); TimeUnit.SECONDS.toHours(temp) TimeUnit.SECONDS.toHours TimeUnit.SECONDS TimeUnit TimeUnit.SECONDS temp public String getTime() {
		StringBuilder sb = new StringBuilder();
		sb.append(this.getHour().toString());
		sb.append(":");
		sb.append(this.getMinute());
		sb.append(":");
		sb.append(this.getSecond());
		return sb.toString();
	} getTime {
		StringBuilder sb = new StringBuilder();
		sb.append(this.getHour().toString());
		sb.append(":");
		sb.append(this.getMinute());
		sb.append(":");
		sb.append(this.getSecond());
		return sb.toString();
	} StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(this.getHour().toString()) sb.append sb this.getHour().toString() this.getHour().toString this.getHour() this.getHour this sb.append(":") sb.append sb ":" sb.append(this.getMinute()) sb.append sb this.getMinute() this.getMinute this sb.append(":") sb.append sb ":" sb.append(this.getSecond()) sb.append sb this.getSecond() this.getSecond this return sb.toString(); sb.toString() sb.toString sb public class Main {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
} public class Main {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.concurrent.TimeUnit;

/**
 *
 * @author yoshkur
 */
public class Main {

	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);

			System.out.println(inputData.getTime());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
}

class InputData {

	private Long second;

	public InputData(BufferedReader br) throws IOException {
		String line = br.readLine().trim();
		this.second = Long.parseLong(line);
	}

	public Long getSecond() {
		return this.second % TimeUnit.MINUTES.toSeconds(1);
	}
	
	public Long getMinute() {
		Long temp = (this.second - this.getSecond()) % TimeUnit.HOURS.toSeconds(1);
		return TimeUnit.SECONDS.toMinutes(temp);
	}
	
	public Long getHour() {
		Long temp = (this.second - this.getSecond() - this.getMinute()) % TimeUnit.DAYS.toSeconds(1);
		return TimeUnit.SECONDS.toHours(temp);
	}
	
	public String getTime() {
		StringBuilder sb = new StringBuilder();
		sb.append(this.getHour().toString());
		sb.append(":");
		sb.append(this.getMinute());
		sb.append(":");
		sb.append(this.getSecond());
		return sb.toString();
	}
}