#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, x;
  cin >> s;
  int minute, i;
  cin >> minute;
  int rem = minute / 60;
  int time = 0;
  time = time * 10 + (s[0] - 48) * 10;
  time = time * 10 + (s[1] - 48) * 10;
  time /= 10;
  int mn = 0;
  mn = mn * 10 + (s[3] - 48) * 10;
  mn = mn * 10 + (s[4] - 48) * 10;
  mn /= 10;
  int ret = time;
  if (rem != 0) {
    int c = 0;
    for (;; time++, c++) {
      if (time == 24) time = 0;
      if (c == rem) break;
    }
    c = 0;
    for (;; mn++, c++) {
      if (mn == 60) {
        mn = 0;
        time++;
        if (time == 24) {
          time = 0;
        }
      }
      if (c == (minute - rem * 60)) break;
    }
    if (time <= 9) cout << 0;
    cout << time << ":";
    if (mn <= 9)
      cout << 0 << mn << endl;
    else
      cout << mn << endl;
  } else {
    int c = 0;
    for (;; mn++, c++) {
      if (mn == 60) {
        mn = 0;
        time++;
        if (time == 24) {
          time = 0;
        }
      }
      if (c == (minute - rem * 60)) break;
    }
    if (time <= 9) cout << 0;
    cout << time << ":";
    if (mn <= 9)
      cout << 0 << mn << endl;
    else
      cout << mn << endl;
  }
  return 0;
}
