I write a shell script, which gets an input file, extracts number x, which is on the first line, and numbers A1,...,An, each on a new line. I need to calculate a polynomial: