#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return x;
}
void solve() {
  int h = read(), m = read();
  int x = read();
  m += x;
  h += m / 60;
  m %= 60;
  h %= 24;
  printf("%02d:%02d", h, m);
}
int main() {
  solve();
  return 0;
}
