#!/usr/bin/python ''' Description: Use sigmoid equation for logistic regression Keywords: sigmoid, logistic, logistic regression, regression, pop, split Example Input: 1.5 2 -1 -2.5 3 2 -1 2 0.5 ''' e=2.7182818284590452353602874713527 C = str(raw_input()) X = str(raw_input()) C = C.split(" ") X = X.split(" ") x=float(C.pop()) for i in range(0, len(X)): # x = x+(float(C[i])*(float(X[i])**(float(len(X))-float(i)))) x = x+(float(C[i])*float(X[i])) print str(format(round(1/(1+(e**(-x))),3),'.3f'))