#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, a, hr, h, m, mins, nm;
  string s;
  cin >> s;
  scanf("%d", &a);
  ;
  hr = (s[1] - '0') + (s[0] - '0') * 10;
  mins = (s[4] - '0') + (s[3] - '0') * 10;
  h = a / 60;
  m = a - 60 * h;
  hr = (hr + h) % 24;
  nm = (mins + m) % 60;
  if (nm < mins) hr++;
  hr = hr % 24;
  if (hr < 10)
    cout << "0" << hr << ":";
  else
    cout << hr << ":";
  if (nm < 10)
    cout << "0" << nm << endl;
  else
    cout << nm << endl;
  return 0;
}
