#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using LL = int64_t;
using pii = pair<int, int>;
const double PI = 2 * asin(1);
int g_h, g_m, g_min;
void pretreat() {}
void input() { cin >> g_min; }
void solve() {
  int h = g_min / 60, m = g_min % 60;
  g_h += h;
  g_h %= 24;
  g_m += m;
  if (g_m >= 60) {
    ++g_h;
    g_h %= 24;
    g_m %= 60;
  }
  printf("%02d:%02d\n", g_h, g_m);
}
int main() {
  pretreat();
  int t;
  while (scanf(" %d: %d", &g_h, &g_m) != EOF) {
    input();
    solve();
  }
  return 0;
}
