#include <bits/stdc++.h>
using namespace std;
bool Is2n(int n) {
  if (n <= 0) return false;
  if ((n & ((~n) + 1)) == n)
    return true;
  else
    return false;
}
int gcd(int a, int b) {
  int c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
int main() {
  int a, b;
  char c;
  cin >> a >> c >> b;
  while (1) {
    b++;
    a += b / 60;
    b %= 60;
    a %= 24;
    if (a / 10 == b % 10 && a % 10 == b / 10) {
      if (a / 10 == 0) cout << 0;
      cout << a << ":";
      if (b / 10 == 0) cout << 0;
      cout << b;
      return 0;
    }
  }
  return 0;
}
