import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int m = scanner.nextInt();
if(m%4==0){
if(m%100!=0){
System.out.print("29");
}else if(m%400==0){
System.out.print("29");
}else{
System.out.print("28");
}
}else{
System.out.print("28");
}
}
}
实战