
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();
    }
} import java.util.Scanner; Scanner java.util 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();
    }
} Main private static Scanner scanner; scanner private static final int HH_TIME = 3600; HH_TIME 3600 private static final int MM_TIME = 60; MM_TIME 60 public static void main(String[] args) {
        scanner = new Scanner(System.in);
        System.out.println(timeChangeHMS(scanner.nextInt()));
    } main {
        scanner = new Scanner(System.in);
        System.out.println(timeChangeHMS(scanner.nextInt()));
    } scanner = new Scanner(System.in) scanner new Scanner(System.in) System.out.println(timeChangeHMS(scanner.nextInt())) System.out.println System.out System System.out timeChangeHMS(scanner.nextInt()) timeChangeHMS scanner.nextInt() scanner.nextInt scanner String[] args args /*
     * 秒数から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();
    } timeChangeHMS {
        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();
    } Integer hh = 0; hh 0 Integer mm = 0; mm 0 Integer ss = 0; 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;
        } input >= HH_TIME 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;
            }
        } Integer mm_s = 0; mm_s 0 hh = input / HH_TIME hh input / HH_TIME input HH_TIME mm_s = input % HH_TIME mm_s input % HH_TIME input HH_TIME if (mm_s >= MM_TIME) {
                mm = mm_s / MM_TIME;
                ss = mm_s % MM_TIME;
            } else {
                ss = mm_s;
            } mm_s >= MM_TIME mm_s MM_TIME {
                mm = mm_s / MM_TIME;
                ss = mm_s % MM_TIME;
            } mm = mm_s / MM_TIME mm mm_s / MM_TIME mm_s MM_TIME ss = mm_s % MM_TIME ss mm_s % MM_TIME mm_s MM_TIME {
                ss = mm_s;
            } ss = mm_s ss mm_s {
            mm = input / MM_TIME;
            ss = input % MM_TIME;
        } mm = input / MM_TIME mm input / MM_TIME input MM_TIME ss = input % MM_TIME ss input % MM_TIME input MM_TIME return hh.toString() + ":" + mm.toString() + ":" + ss.toString(); hh.toString() + ":" + mm.toString() + ":" + ss.toString() ":" mm.toString() hh.toString() + ":" + mm.toString() + ":" + ss.toString() hh.toString() hh.toString hh ":" mm.toString() mm.toString mm ":" ss.toString() ss.toString ss int input input 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();
    }
} 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();
    }
} Main

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();
    }
}