def main(): months = [int(i) for i in range(1, 13)] days = [int(i) for i in range(1, 32)] count = 0 j = 0 while j < len(months): month = months[j] j += 1 i = 0 while i < len(days): day_str = str(days[i]) day_sum = sum(map(int, list(day_str))) i += 1 if day_sum == month: count += 1 print(count - 1) if __name__ == "__main__": main()