#include <bits/stdc++.h>
using namespace std;
string s;
int h, m, n, ch, cm;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  h = (s[0] - '0') * 10 + (s[1] - '0');
  m = (s[3] - '0') * 10 + (s[4] - '0');
  cin >> n;
  n = n % (24 * 60);
  ch = n / 60;
  cm = n % 60;
  h = (h + ch + (cm + m) / 60) % 24;
  m = (m + cm) % 60;
  if (h < 10)
    cout << "0" << h << ":";
  else
    cout << h << ":";
  if (m < 10)
    cout << "0" << m << endl;
  else
    cout << m << endl;
  return 0;
}
