can `head + last` overflow here before being multiplied with a long?