d = eval(input()) print (int(d/365), "ano(s)") m = d % 365 print (int(m/30), "mes(es)") print (int(m%30), "dia(s)")