If a1,a2,a3,a4,a5anda6 are consecutive odd natural numbers such that a6>a1,a1+a2+a3+a4+a5+a6=p3anda5=39, then the value of (a3+a4−12p) is equal to