Foreign investment in Spain rose to 36.12 billion euros in 2017, the highest figure since 2008