#include <iostream>

int main() {
    const int days[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    int month;
    std::cin >> month;
    if (month <= 0 || month > 12) {
        std::cout << "You are a bad person!\n";
        return 0;
    }
    std::cout << days[month - 1] << '\n';
}
