#include <bits/stdc++.h>
char s[10000];
using namespace std;
vector<long long int> v;
int main() {
  string t, h = "", m = "";
  long long int a;
  cin >> t >> a;
  bool f = false;
  for (int i = 0; i < t.length(); i++) {
    if (t[i] == ':') {
      f = true;
      continue;
    }
    if (!f)
      h += t[i];
    else
      m += t[i];
  }
  long long int hh, mm;
  hh = stoi(h);
  mm = stoi(m);
  hh = (hh + ((mm + a) / 60)) % 24;
  mm = (mm + a) % 60;
  if (hh < 10) cout << 0;
  cout << hh << ":";
  if (mm < 10) cout << 0;
  cout << mm;
  return 0;
}
