#include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
  scanf("%d:%d", &a, &b);
  int k;
  cin >> k;
  a += k / 60;
  k %= 60;
  a %= 24;
  b += k;
  a += b / 60;
  a %= 24;
  b %= 60;
  if (a < 10) {
    cout << "0";
  }
  cout << a << ":";
  if (b < 10) {
    cout << "0";
  }
  cout << b << endl;
  return 0;
}
