Read a positive integer n and print the sum of all the odd numbers from 1 to n, including n itself if it is odd.
For n = 7 the odd numbers are 1, 3, 5 and 7, so the answer is 16.
A single integer n (1 or more).
A single integer: the sum.
NOTE: This is an I/O type question, you need to write the whole code for taking input and printing the output.
Write a complete program: read the input with input() and print the result with print().
Input
7
Output
16

Read a positive integer `n` and print the sum of all the odd numbers from 1 to `n`, including `n` itself if it is odd. For `n = 7` the odd numbers are 1, 3, 5 and 7, so the answer is 16. ### Input Format A single integer `n` (1 or more). ### Output Format A single integer: the sum. NOTE: This is an I/O type question, you need to write the whole code for taking input and printing the output. ## Your task Write a complete program: read the input with `input()` and print the result with `print()`. ## Example **Input** ``` 7 ``` **Output** ``` 16 ``` Write a function `count_even_digits(n)` that returns how many digits of the integer `n` are even. `n` is 0 or more. The even digits are 0, 2, 4, 6 and 8. The number 0 has one digit, and that digit is even, so the answer for 0 is 1. NOTE: This is a function type question, you don't have to take input or print the output, just have to complete the required function definition. ### Example ``` count_even_digits(2048) -> 4 count_even_digits(1357) -> 0 ``` ## Your task Implement this function: ```python def count_even_digits(n: int) -> int: ``` Write the function only — the arguments are read for you and the return value is printed automatically. **Arguments** arrive as one Python literal per line, in this order: `n`. ## Example **Input** ``` 2048 ``` **Output** ``` 4 ``` Read a positive integer `n` and print a triangle of `n` rows made of the character `*`. Row 1 has 1 star, row 2 has 2 stars, and so on: row `i` has exactly `i` stars. There are no spaces anywhere in the output. ### Input Format A single integer `n` (from 1 to 30). ### Output Format The triangle, one row on each line. For `n = 3` it is ``` * ** *** ``` NOTE: This is an I/O type question, you need to write the whole code for taking input and printing the output. ## Your task Write a complete program: read the input with `input()` and print the result with `print()`. ## Example **Input** ``` 3 ``` **Output** ``` * ** *** ```