#include <bits/stdc++.h>
#pragma optimise GCC(-O2)
using namespace std;
mt19937_64 rang(
    chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
  uniform_int_distribution<int> uid(0, lim - 1);
  return uid(rang);
}
long long INF = LLONG_MAX;
const long long M = 1000000007;
long long powm(long long, long long);
long long foo(long long a) {
  long long ct = 1;
  long long tp = a;
  while (tp > 0) {
    tp -= ct;
    ct++;
  }
  return ct;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long hr = 0;
  long long mn = 0;
  hr += 10 * (s[0] - '0');
  hr += (s[1] - '0');
  mn += 10 * (s[3] - '0');
  mn += (s[4] - '0');
  long long a;
  cin >> a;
  mn += a;
  long long ex = mn / 60;
  mn = mn % 60;
  hr += ex;
  hr %= 24;
  if (hr > 9 && mn > 9) cout << hr << ":" << mn;
  if (hr > 9 && mn <= 9) cout << hr << ":" << '0' << mn;
  if (hr <= 9 && mn > 9) cout << '0' << hr << ":" << mn;
  if (hr <= 9 && mn <= 9) cout << '0' << hr << ":" << '0' << mn;
}
long long powm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % M;
    a = (a * a) % M;
    b >>= 1;
  }
  return res;
}
