
import java.util.Scanner;

public class Main {

    private static Scanner scanner;
    private static final int HH_TIME = 3600;
    private static final int MM_TIME = 60;

    public static void main(String[] args) {
        scanner = new Scanner(System.in);
        System.out.println(timeChangeHMS(scanner.nextInt()));
    }

    /*
     * 秒数からHH:MM:SSで変換します。
     */
    private static String timeChangeHMS(int input) {
        Integer hh = 0;
        Integer mm = 0;
        Integer ss = 0;
        if (input >= HH_TIME) {
            Integer mm_s = 0;
            hh = input / HH_TIME;
            mm_s = input % HH_TIME;
            if (mm_s >= MM_TIME) {
                mm = mm_s / MM_TIME;
                ss = mm_s % MM_TIME;
            } else {
                ss = mm_s;
            }
        } else {
            mm = input / MM_TIME;
            ss = input % MM_TIME;
        }
        return hh.toString() + ":" + mm.toString() + ":" + ss.toString();
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz