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