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