#include <bits/stdc++.h>
using namespace std;
inline long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
int main() {
  string s;
  cin >> s;
  int h = (s[0] - '0') * 10 + (s[1] - '0');
  int m = (s[3] - '0') * 10 + (s[4] - '0');
  int dm;
  cin >> dm;
  int dh = dm / 60;
  dm = dm % 60;
  m += dm;
  h += m / 60;
  m %= 60;
  h += dh;
  h %= 24;
  if (h < 10) cout << 0;
  cout << h << ":";
  if (m < 10) cout << 0;
  cout << m << '\n';
  return 0;
}
