import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
import java.util.TimeZone;
Scanner scan = new Scanner(System.in);
System.out.print("");
int num = scan.nextInt();
scan.close();
TimeZone tz = TimeZone.getTimeZone("UTC");
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
df.setTimeZone(tz);
String time = df.format(new Date(num * 1000));
System.out.println(time);