#include <bits/stdc++.h>
using namespace std;
string ITS(long long x) {
  string s = "";
  while (x > 0) {
    s += (char)(x % 10 + '0');
    x /= 10;
  }
  string t = "";
  for (int i = s.size() - 1; i > -1; i--) t += s[i];
  return t;
}
long long inf = 1e18;
long long mod = 1e9 + 7;
const long long M = 3e5 + 5;
int main() {
  std::ios::sync_with_stdio(false);
  string s;
  cin >> s;
  long long a;
  cin >> a;
  long long h = s[0] - '0';
  h *= 10;
  h += s[1] - '0';
  long long m = s[3] - '0';
  m *= 10;
  m += s[4] - '0';
  m += a;
  h += m / 60;
  m %= 60;
  h %= 24;
  cout << h / 10 << h % 10 << ':' << m / 10 << m % 10;
}
