#include <bits/stdc++.h>
long long fact(int x);
long long binary(long long x);
using namespace std;
int main() {
  int h, m;
  long long a;
  char s;
  cin >> h >> s >> m;
  cin >> a;
  while (a >= 60) {
    a -= 60;
    h += 1;
  }
  m += a;
  if (m >= 60) {
    m -= 60;
    h += 1;
  }
  while (h >= 24) {
    h -= 24;
  }
  if (h <= 9) cout << 0;
  cout << h << s;
  if (m <= 9) cout << 0;
  cout << m << endl;
  return 0;
}
long long fact(int x) {
  int fact = 1;
  for (int i = 1; i <= x; i++) {
    fact *= i;
  }
  return fact;
}
long long binary(long long x) {
  long long remainder = 0, base = 1, binary = 0;
  while (x != 0) {
    remainder = x % 2;
    binary += remainder * base;
    x /= 2;
    base *= 10;
  }
  return binary;
}
