#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 55;
const int inf = 1e9 + 77;
const int MOD = 1e9 + 7;
const double eps = 1e-7;
map<int, int> mp;
pair<int, int> pi;
vector<long long> v;
map<char, int> mp1;
deque<int> d;
int x[2 * MAX], b[2 * MAX];
char c[MAX];
int cnt[MAX];
int main() {
  string s;
  cin >> s;
  int x;
  cin >> x;
  int hour = ((s[0] - '0') * 10) + s[1] - '0';
  int minute = ((s[3] - '0') * 10) + s[4] - '0';
  int h = 0;
  int m = 0;
  if (x >= 60) {
    h = x / 60;
    m = x % 60;
  } else {
    m += x;
  }
  hour += h;
  minute += m;
  while (hour >= 24) {
    hour -= 24;
  }
  while (minute >= 60) {
    minute -= 60;
    hour++;
    if (hour >= 24) hour -= 24;
  }
  if (hour >= 10 && minute >= 10)
    cout << hour << ":" << minute;
  else if (hour >= 10 && minute < 10)
    cout << hour << ":" << '0' << minute;
  else if (hour < 10 && minute >= 10)
    cout << '0' << hour << ":" << minute;
  else
    cout << '0' << hour << ":" << '0' << minute;
  return 0;
}
