#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, m, n;
  char c;
  cin >> h >> c >> m >> n;
  int h1 = n / 60;
  int m1 = n % 60;
  int m2 = m + m1;
  if (m2 >= 60) {
    h1 = h1 + m2 / 60;
    m2 = m2 % 60;
  }
  int h2 = h + h1;
  if (h2 > 23) {
    h2 = h2 % 24;
  }
  cout.fill('0');
  cout.width(2);
  cout << h2 << c;
  cout.fill('0');
  cout.width(2);
  cout << m2 << endl;
  return 0;
}
