a=list(map(int,input().split()));print((sum(a)-max(a)-min(a))/4)