5. In a rectangular table, the letters of the word "олимпиада" (olympiada) are arranged in a certain order.

| $\mathrm{O}$ | Л | И | M | П | И | A | Д | A |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| Л | И | M | П | И | A | Д | A | O |
| И | M | П | И | A | Д | A | O | Л |
| M | П | И | A | Д | A | O | Л | И |

You need to read the word "олимпиада" (olympiada), starting from the letter "O" located in the top-left corner of the table and ending with the letter "A". You are allowed to move from one letter to another if they are in adjacent cells of the table. Find the number of different ways to read the word "олимпиада" (olympiada) according to the given table.
Solution. In each cell of the table shown below

| $\mathrm{O}$ | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |  |
| 1 | 3 | 6 | 10 | 15 | 21 | 28 |  |  |
| 1 | 4 | 10 | 20 | 35 | 56 |  |  |  |

the number of different paths leading to the letter in that cell when reading the word "олимпиада" (Olympiada) is recorded. For example, in the cell in the third column and second row, i.e., to the letter $M$, there are three different ways to read "олим" (Olim): two paths from the cell in the second column and second row, and one path from the cell in the second column and first row. In general, to obtain the number in the cell at the intersection of row $i$ and column $j$, you need to add the number in the $(j-1)$-th cell of row $i$ and the number in the $j$-th cell of row $(i-1)$. In each of the shaded cells, where the last letter "A" of the word "олимпиада" (Olympiada) is located, the number of different ways to read this word, provided that the reading ends in this cell, is indicated. To get the answer, you need to add all the numbers in the highlighted cells: $n=56+28+8+1=93$.

Answer: $n=93$.

## Answers for other variants.

## Variant 2