program pil_7_32_b(input,output);
const 
	d=13;
	wd=0;
type 
	month=(jan,feb,mar,apr,may,jun,jul,aug,sep,okt,nov,dec);
       weekday=(mon,tue,wed,thu,fri,sat,sun);
var  
	m : month; 
	wd1 : weekday; 
	k : 0..12; 
	s : 0..365; 
	t : 1..7;
       day : 0..7;
Begin
  Writeln('Input wd1:');
  Read(t);
  wd1 := mon;
  While ord(wd1)+1<t do wd1 := succ(wd1);
  s := d;k := 0;
  For m := jan to dec do
   Begin
    If m>jan then
     Case pred(m) of
      jan,mar,may,jul,aug,okt,dec : s := s+31;
      feb : s := s+28;
      apr,jun,sep,nov:s := s+30;
     End;
    day := s mod 7;
    if day=0 then day := 7;
    day := (day+ord(wd1)-1)mod 7;
    If day=wd then k := k+1
   End;
   Writeln('Result : ',k)
End.
