All together Maria and Nick had $12. After Maria spent 30% of her money and Nick spent 50 % of his money, Maria and Nick were left with the same amount. How much money did Nick have to begin with?