#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  char nt = ':';
  cin >> a >> nt >> b;
  cin >> c;
  if (c >= 60) {
    a += c / 60;
    b += c % 60;
  } else
    b += c;
  if (b >= 60) {
    a += b / 60;
    b = b % 60;
  }
  if (a > 23) a = a % 24;
  if (a / 10 == 0 && b / 10 == 0)
    cout << "0" << a << ":"
         << "0" << b;
  else if (a / 10 == 0 && b / 10 != 0)
    cout << "0" << a << ":" << b;
  else if (a / 10 != 0 && b / 10 == 0)
    cout << a << ":"
         << "0" << b;
  else
    cout << a << ":" << b;
  return 0;
}
