def dbleAndAdd(self, P, Pp, n):
    'return n*P using double and add technique'
    if (n == 0):
        return self.zero()
    if (n == 1):
        return P
    elif ((n % 2) == 1):
        Q = self.dbleAndAdd(P, Pp, ((n - 1) / 2))
        return ((P + Q) + Q)
    elif ((n % 2) == 0):
        Q = self.dbleAndAdd(P, Pp, (n / 2))
        return (Q + Q)
return n*P using double and add technique
def dbleAndAdd(self, P, Pp, n):
    
    if (n == 0):
        return self.zero()
    if (n == 1):
        return P
    elif ((n % 2) == 1):
        Q = self.dbleAndAdd(P, Pp, ((n - 1) / 2))
        return ((P + Q) + Q)
    elif ((n % 2) == 0):
        Q = self.dbleAndAdd(P, Pp, (n / 2))
        return (Q + Q)