#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, x, y;
  int i, j;
  while (scanf("%d:%d", &n, &m) != EOF) {
    x = 0;
    y = 0;
    scanf("%d", &k);
    m = m + k;
    if (m >= 60) {
      x = m / 60;
      m = m % 60;
    }
    n = n + x;
    if (n >= 24) {
      n = n % 24;
    }
    printf("%02d:%02d\n", n, m);
  }
  return 0;
}
