#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
const double Pi = acos(-1.0);
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int hh, mm, d;
  char ch;
  while (cin >> hh >> ch >> mm >> d) {
    d += mm;
    mm = d % 60;
    hh += d / 60;
    hh %= 24;
    cout.fill('0');
    cout << setw(2) << hh << ch << setw(2) << mm << endl;
  }
}
