Programs can be written to have  as many variables as you need, but you can solve this problem  with just one.
Si possono scrivere programmi con tutte le variabili necessarie, ma per risolvere questo problema ne basta una sola.