#include <bits/stdc++.h>

using namespace std;

int main() {
  int h, d;
  scanf("%d:%d", &h, &d);
  if (d + 5 >= 60) h = (h + 1) % 24;
  d = (d + 5) % 60;
  if (h < 10) cout << "0" << h << ":";
  else cout << h << ":";
  if (d < 10) cout << "0" << d << endl;
  else cout << d << endl;
  return 0;
}