#include <bits/stdc++.h>
using namespace std;
int time_to_minute(int h, int m) { return h * 60 + m; }
void minute_to_time(int t, int& h, int& m) {
  h = t / 60;
  m = t % 60;
}
int main() {
  ios_base::sync_with_stdio(false);
  int h, m, a;
  cin >> h;
  cin.ignore(1);
  cin >> m >> a;
  minute_to_time((time_to_minute(h, m) + a) % (24 * 60), h, m);
  cout << (h < 10 ? "0" : "") << h << ":" << (m < 10 ? "0" : "") << m;
}
