#include <iostream>
using namespace std;
int n,h,m;
int main()
{
cin >> n;
if(n>=3600)
{
h=n/3600;
n-=h*3600;
while(h>24)
h-=24;
if(h<10)
cout << "0" << h << ":";
else
cout << h << ":";
}
else
cout << "00:";
m=n/60;
n-=m*60;
if(m<10)
cout << "0" << m << ":";
else
cout << m << ":";
if(n<10)
cout << "0" << n;
else
cout << n;
return 0;
}