#include <bits/stdc++.h>
int main() {
  int a, b, n;
  scanf("%d", &n);
  scanf("%d", &b);
  scanf("%d", &a);
  a = n / 3;
  if (n % 3 == 2) a = a + 1;
  b = a / 12;
  a = a % 12;
  printf("%d", b);
  printf("%d", a);
  return 0;
}
