import math
t=[]
s=290797
for i in range(1000):
s=(s*s)%50515093
t.append((s%2000)-1000)
pts=[(t[2*i],t[2*i+1]) for i in range(500)]
m=0.0
c=0
for x,y in pts:
sub=sorted([(a-x,b-y) for a,b in pts if b>y or (b==y and a>x)], key=lambda u:math.atan2(u[1],u[0]))
d=[[0]*500 for i in range(500)]
for i in range(len(sub)):
j=i-1
while j>=0 and sub[i][0]*sub[j][1]==sub[i][1]*sub[j][0]:
j-=1
flag=(j==i-1)
while j>=0:
k=j-1
while k>=0 and ((sub[i][0]-sub[j][0])*(sub[k][1]-sub[j][1])-(sub[i][1]-sub[j][1])*(sub[k][0]-sub[j][0]))<0:
k-=1
s=abs(sub[i][0]*sub[j][1]-sub[i][1]*sub[j][0])
if k>=0:
s+=d[j][k]
if flag:
d[i][j]=s
m=max(m,s)
j=k
if flag:
for j in range(1,i):
d[i][j]=max(d[i][j],d[i][j-1])
c+=1
if c%5==0:print c/5,"percent completed, current max:",0.5*m
print 0.5*m