%02d:若结果不足两位,则左补0(用来补前导零)
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int h,m,s;
long long n;
cin>>n;
n/=1000;
n%=86400;
h=n/3600;
n%=3600;
m=n/60;
s=n%60;
printf("%02d:%02d:%02d\n",h,m,s);
return 0;
}