#include <bits/stdc++.h>
using namespace std;
string time(string, int);
int main() {
  int period;
  string t;
  cin >> t;
  cin >> period;
  cout << time(t, period) << endl;
  return 0;
}
string time(string t, int period) {
  int hh = (t[0] - '0') * 10 + (t[1] - '0');
  int mm = (t[3] - '0') * 10 + (t[4] - '0');
  mm += period;
  if (mm >= 60) {
    hh += mm / 60;
    mm %= 60;
  }
  if (hh >= 24) hh %= 24;
  stringstream s1, s2;
  string s;
  s1 << hh;
  s2 << mm;
  if (hh < 10) s = "0";
  s += s1.str();
  s += ":";
  if (mm < 10) s += "0";
  s += s2.str();
  return s;
}
