#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, n, m, k = 0, l;
  cin >> s;
  cin >> n;
  char c = s[0];
  char d = s[1];
  i = 10 * (c - 48) + (d - 48);
  m = 10 * (s[3] - 48) + (s[4] - 48);
  n = n % 1440;
  int j = n % 60;
  m = m + j;
  if (m > 59) {
    m = m - 60;
    k++;
  }
  l = n / 60;
  l = l + k;
  i = i + l;
  if (i > 23) i = i - 24;
  if (i < 10 && m > 9)
    cout << "0" << i << ":" << m;
  else if (i > 9 && m <= 9)
    cout << i << ":"
         << "0" << m;
  else if (i <= 9 && m <= 9)
    cout << "0" << i << ":"
         << "0" << m;
  else
    cout << i << ":" << m;
  return 0;
}
