#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); int ans=0; for(int i=1,n;i<=12;++i){ if(i==2)n=28; else if(i<8&&i%2==1||i>=8&&i%2==0)n=31; else n=30; for(int j=1,t,t2;j<=n;++j){ t=j; while(t){ t2=t%10; t/=10; } if(t2==i)++ans; } } cout<