#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, hrs, mns;
  int hr, mn, h, m;
  cin >> str;
  hr = (str[0] - 48) * 10;
  hr += str[1] - 48;
  mn = (str[3] - 48) * 10;
  mn += str[4] - 48;
  cin >> m;
  h = m / 60;
  m %= 60;
  mn += m;
  if (mn >= 60) {
    h++;
    mn = mn % 60;
  }
  hr += h;
  if (hr >= 24) {
    hr = hr % 24;
  }
  if (hr < 10) {
    cout << "0";
  }
  cout << hr << ":";
  if (mn < 10) {
    cout << "0";
  }
  cout << mn;
  return 0;
}
