#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <sstream>
using namespace std;

int main(){
  double a, c;
  cin >> a;
  double add = 60*(a/100);
  int b = (int)(10 + add/60)%24;

  string d = to_string(fmod(add, 60));
  d = d.substr(0, d.find('.'));
  if (d.length() == 1) d = "0" + d;
  cout << b << ":"  << d << endl;
}