#include <bits/stdc++.h>
using namespace std;
void inc(int &a, char c, int &b) {
  if (b == 59) {
    b = 0;
    a++;
    if (a == 24) {
      a = 0;
    }
  } else {
    b++;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  int a, b;
  char c;
  cin >> a >> c >> b;
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    inc(a, c, b);
  }
  if (a >= 10) {
    cout << a;
  } else {
    cout << 0 << a;
  }
  cout << c;
  if (b >= 10) {
    cout << b;
  } else {
    cout << 0 << b;
  }
  return 0;
}
