#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 123;
void win() {
  int h, m;
  char ch;
  cin >> h >> ch >> m;
  int x;
  cin >> x;
  int day = h * 60 + m + x;
  day %= 1440;
  h = day / 60;
  m = day % 60;
  if (h < 10) {
    cout << '0' << h << ':';
  } else {
    cout << h << ':';
  }
  if (m < 10) {
    cout << '0' << m;
  } else {
    cout << m;
  }
}
int main() {
  int q = 1;
  while (q--) {
    win();
  }
}
