Discover the rule used for the filled cells and complete the table. What is the value of A?

| $\mathbf{0}$ | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ |
| :---: | :---: | :---: | :---: | :---: |
| $\mathbf{1}$ | 2 | 5 | 10 |  |
| $\mathbf{2}$ |  |  |  |  |
| $\mathbf{3}$ |  |  |  |  |
| $\mathbf{4}$ |  |  |  | A |
Observe that in each square formed by 4 small squares, the number in the bottom right is the sum of the other 3 numbers. Thus, we have:

| $\mathbf{0}$ | $\mathbf{1}$ | $\mathbf{2}$ | $\mathbf{3}$ | $\mathbf{4}$ |
| :---: | :---: | :---: | :---: | :---: |
| $\mathbf{1}$ | 2 | 5 | 10 | $3+4+10=17$ |
| $\mathbf{2}$ | $1+2+2=5$ | $2+5+5=12$ | $5+10+12=27$ | $10+17+27=54$ |
| $\mathbf{3}$ | 10 | 27 | 66 | 147 |
| $\mathbf{4}$ | 17 | 54 | 147 | $\mathbf{A}$ |

Therefore:

$$
\mathbf{A}=66+147+147=360
$$