gets
Z=$<.map{|s|x,y,d=s.split
[x.to_i,y.to_i,"RULD"=~/#{d}/]}
T=*1,0,-1,l=0
f=->n{b=d=-a=c=1e9
Z.map{|x,y,i|x=x*2+n*T[i]
y=y*2+n*T[i^1]
x<a&&a=x
x>b&&b=x
y<c&&c=y
y>d&&d=y}
(b-a).*d-c}
r=10**9
48.times{f[a=(l*2+r)/3]<f[b=(l+r*2)/3]?r=b:l=a}
p f[l+r>>1]/4.0