Brazilian winger Malcom has joined Zenit St Petersburg from Barcelona in a 40m euro deal.