import java.util.Scanner;

class Main{
    public static void main(String[] args){
        int h,m,s;
        Scanner timeScan = new Scanner(System.in);
        int time = timeScan.nextInt();

        h = 0;
        m = 0;
        s = 0;

        if(time < 0 || 86400 < time) {
            throw new RuntimeException("範囲外");
        }
        s = time % 60;
        m = (time / 60) % 60;
        h = (time / 60) / 60;

        System.out.println(h+":"+m+":"+s);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        int h,m,s;
        Scanner timeScan = new Scanner(System.in);
        int time = timeScan.nextInt();

        h = 0;
        m = 0;
        s = 0;

        if(time < 0 || 86400 < time) {
            throw new RuntimeException("範囲外");
        }
        s = time % 60;
        m = (time / 60) % 60;
        h = (time / 60) / 60;

        System.out.println(h+":"+m+":"+s);
    }
} Main public static void main(String[] args){
        int h,m,s;
        Scanner timeScan = new Scanner(System.in);
        int time = timeScan.nextInt();

        h = 0;
        m = 0;
        s = 0;

        if(time < 0 || 86400 < time) {
            throw new RuntimeException("範囲外");
        }
        s = time % 60;
        m = (time / 60) % 60;
        h = (time / 60) / 60;

        System.out.println(h+":"+m+":"+s);
    } main {
        int h,m,s;
        Scanner timeScan = new Scanner(System.in);
        int time = timeScan.nextInt();

        h = 0;
        m = 0;
        s = 0;

        if(time < 0 || 86400 < time) {
            throw new RuntimeException("範囲外");
        }
        s = time % 60;
        m = (time / 60) % 60;
        h = (time / 60) / 60;

        System.out.println(h+":"+m+":"+s);
    } int h h m m s; s Scanner timeScan = new Scanner(System.in); timeScan new Scanner(System.in) int time = timeScan.nextInt(); time timeScan.nextInt() timeScan.nextInt timeScan h = 0 h 0 m = 0 m 0 s = 0 s 0 if(time < 0 || 86400 < time) {
            throw new RuntimeException("範囲外");
        } time < 0 || 86400 < time time < 0 time 0 86400 < time 86400 time {
            throw new RuntimeException("範囲外");
        } throw new RuntimeException("範囲外"); new RuntimeException("範囲外") s = time % 60 s time % 60 time 60 m = (time / 60) % 60 m (time / 60) % 60 (time / 60) time 60 60 h = (time / 60) / 60 h (time / 60) / 60 (time / 60) time 60 60 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.util.Scanner;

class Main{
    public static void main(String[] args){
        int h,m,s;
        Scanner timeScan = new Scanner(System.in);
        int time = timeScan.nextInt();

        h = 0;
        m = 0;
        s = 0;

        if(time < 0 || 86400 < time) {
            throw new RuntimeException("範囲外");
        }
        s = time % 60;
        m = (time / 60) % 60;
        h = (time / 60) / 60;

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