#include <bits/stdc++.h>
using namespace std;
class node {
 public:
  long long int second;
  long long int length;
};
void FastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  long long int h, m, a;
  char c;
  cin >> h >> c >> m;
  cin >> a;
  h += a / 60;
  m += a % 60;
  if (m >= 60) m -= 60, h++;
  if (h % 24 < 10) cout << "0";
  cout << h % 24 << ":";
  if (m < 10) cout << "0";
  cout << m << endl;
  return 0;
}
