#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  string time = "", h_str = "", min_str = "";
  long long h = 0, min = 0;
  cin >> time >> n;
  h_str = time[0];
  h_str += time[1];
  min_str = time[3];
  min_str += time[4];
  h = atoi(h_str.c_str());
  min = atoi(min_str.c_str());
  for (int i = 0; i < n; i++) {
    if (min == 60) {
      min = 0;
      if (h == 24) {
        h = 0;
      }
      h++;
    }
    min++;
  }
  if (min == 60) {
    min = 0;
    if (h == 24) {
      h = 0;
    }
    h++;
  }
  if (h > 24) {
    h /= 24;
  }
  if (h == 24) {
    h_str = "00";
  }
  if (h < 10) {
    h_str = '0' + to_string(h);
  }
  if (h > 9 && h < 24) {
    h_str = to_string(h);
  }
  if (min == 60) {
    min_str = "00";
  }
  if (min < 10) {
    min_str = '0' + to_string(min);
  }
  if (min > 9 && min < 60) {
    min_str = to_string(min);
  }
  cout << h_str << ':' << min_str;
}
