#include <bits/stdc++.h>
using namespace std;
int main() {
  string t;
  long long min;
  cin >> t;
  cin >> min;
  long long hours = (t[0] - '0') * 10 + (t[1] - '0');
  long long minutes = (t[3] - '0') * 10 + (t[4] - '0');
  long long addHours = (min / 60);
  long long addMin = min % 60;
  hours += addHours;
  hours = hours % 24;
  minutes += addMin;
  if (minutes >= 60) {
    hours += 1;
    minutes = minutes % 60;
  }
  hours = hours % 24;
  if (hours < 10)
    cout << "0" << hours;
  else
    cout << hours;
  cout << ":";
  if (minutes < 10)
    cout << "0" << minutes;
  else
    cout << minutes;
  return 0;
}
