#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, m, a;
  char ch;
  cin >> h >> ch >> m >> a;
  int t = h * 60 + m;
  t += a;
  t %= 1440;
  h = t / 60;
  m = t % 60;
  if (h < 10)
    cout << "0" << h << ":";
  else
    cout << h << ":";
  if (m < 10)
    cout << "0" << m;
  else
    cout << m;
  return 0;
}
