#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, m, m2;
  char ch;
  cin >> h >> ch >> m;
  cin >> m2;
  m += m2;
  if (m >= 60) {
    h += m / 60;
    m = m % 60;
  }
  if (h >= 24) h %= 24;
  if (h < 10) cout << 0;
  cout << h << ch;
  if (m < 10) cout << 0;
  cout << m << endl;
  return 0;
}
