#include <bits/stdc++.h>
using namespace std;
long long a, b, n;
char ch;
int main() {
  cin >> a >> ch >> b;
  cin >> n;
  b += a * 60;
  b += n;
  b %= 1440;
  if (b / 60 < 10)
    cout << 0 << b / 60 << ":";
  else
    cout << b / 60 << ":";
  if (b % 60 < 10) cout << 0;
  cout << b % 60;
}
