#include <bits/stdc++.h>
using namespace std;
string a;
int b, h, m;
void taabs(string x) {
  h = x[0] - '0';
  h *= 10;
  h += x[1] - '0';
  m = x[3] - '0';
  m *= 10;
  m += x[4] - '0';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> a >> b;
  taabs(a);
  m += b;
  int x = m / 60;
  m -= x * 60;
  h += x;
  while (h > 23) {
    h -= 24;
  }
  if (h < 10) cout << 0;
  cout << h << ':';
  if (m < 10) cout << 0;
  cout << m << '\n';
  return 0;
}
