NA61's submissions for Write a function