#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;
int main()
{
int n,m;
cin>>n;
cout<<n/365<<" ano(s)"<<endl;
m=n%365;
cout<<m/30<<" mes(es)"<<endl;
cout<<m%30<<" dia(s)"<<endl;
return 0;
}