import java.util.Scanner;

class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        if(t<0 || 86400<t){
            System.exit(-1);
        }
        System.out.println(t/3600+":"+(t%3600)/60+":"+(t%3600)%60);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        if(t<0 || 86400<t){
            System.exit(-1);
        }
        System.out.println(t/3600+":"+(t%3600)/60+":"+(t%3600)%60);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        if(t<0 || 86400<t){
            System.exit(-1);
        }
        System.out.println(t/3600+":"+(t%3600)/60+":"+(t%3600)%60);
    } main {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        if(t<0 || 86400<t){
            System.exit(-1);
        }
        System.out.println(t/3600+":"+(t%3600)/60+":"+(t%3600)%60);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int t = sc.nextInt(); t sc.nextInt() sc.nextInt sc if(t<0 || 86400<t){
            System.exit(-1);
        } t<0 || 86400<t t<0 t 0 86400<t 86400 t {
            System.exit(-1);
        } System.exit(-1) System.exit System -1 1 System.out.println(t/3600+":"+(t%3600)/60+":"+(t%3600)%60) System.out.println System.out System System.out t/3600+":"+(t%3600)/60+":"+(t%3600)%60 ":" (t%3600)/60 t/3600+":"+(t%3600)/60+":"+(t%3600)%60 t/3600 t 3600 ":" (t%3600)/60 (t%3600) t 3600 60 ":" (t%3600)%60 (t%3600) t 3600 60 String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        if(t<0 || 86400<t){
            System.exit(-1);
        }
        System.out.println(t/3600+":"+(t%3600)/60+":"+(t%3600)%60);
    }
}