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