https://www.acwing.com/problem/content/1343/
#include<bits/stdc++.h>
using namespace std;
int month=1,year=1900,day=1,week=1;
int main(){
int n ;
cin>>n;
// cout<<" 123 "<<endl;
n+=year;
int ans[8]={0};
while(year<n)
{
if(day==13)ans[week]++;
// if(day==13&&week==1)cout<<year<<' '<<month<<' '<<day<<' '<<week<<endl;
if(week==7)week=1;
else
week++;
if(month==12&&day==31){year++,month=1,day=1;continue;}
if(day<28)day++;
else if(day==29&&month==2&&((year%4==0&&year%100!=0)||(year%100==0&&year%400==0)))day=1,month++;
else if(day==28&&month==2&&!((year%4==0&&year%100!=0)||(year%100==0&&year%400==0)))day=1,month++;
else if(day==30&&(month==4||month==6||month==9||month==11))day=1,month++;
else if(day<31)day++;
else day=1,month++;
}
cout<<ans[6]<<' '<<ans[7];
for(int i=1;i<=5;i++)
cout<<' '<<ans[i];
return 0;
}