#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int a, b, x;
  char c;
  cin >> a >> c >> b;
  cin >> x;
  int d = 0;
  x %= 24 * 60;
  b += x % 60;
  a += x / 60;
  if (b >= 60) {
    b %= 60;
    d = 1;
  }
  a += d;
  a %= 24;
  if (a < 10) cout << "0";
  cout << a << ":";
  if (b < 10) cout << "0";
  cout << b;
  return 0;
}
