Find the rate of change at a point on a polynomial Given the equation of a polynomial and an x-coordinate find the rate of change of the point at that x-coord on the curve.

A polynomial is in the form: axn + axn-1 + ... + ax1 + a, where a ϵ Q and n ϵ W. For this challenge, n can also be 0 if you don't want to have to deal with special cases (constants) where there is no x.

To find the rate of change at that x-coord, we can get the derivative of the polynomial and plug in the x-coord. 

Input

The polynomial can be taken in any reasonable form, but you must state what that format is explicitly. For example, an array of the form [..[coefficient, exponent]..] is acceptable.

Output

The rate of change of the point at the x-coord given.

This is code-golf, so shortest code in bytes wins.

Examples

[[4, 3], [-2, 4], [5, 10]]   19    -&gt;   16134384838410
                  [[0, 4]]  400    -&gt;   0
           [[4, 0], [5,1]]  -13    -&gt;   5
      [[4.14, 4], [48, 2]]   -3    -&gt;   -735.12
         [[1, 3], [-5, 0]]    5.4  -&gt;   87.48
Mathematica, 6 bytes
#'@#2&amp;

(Beat THAT, MATL and 05AB1E)
The first argument must be a polynomial, with # as its variable and with &amp; at the end (i.e. a pure function polynomial; e.g. 3 #^2 + # - 7 &amp;). The second argument is the x-coordinate of the point of interest.
Explanation
#'

Take the derivative of the first argument (1 is implied).
... @#2&amp;

Plug in the second argument.
Usage
#'@#2&amp;[4 #^3 - 2 #^4 + 5 #^10 &amp;, 19] (* The first test case *)


16134384838410