David, Ethan, and Frank bought a certain amount of candies. David gave half of his candies to Ethan to exchange three special candies from Ethan. Later, David use five candies to exchange one special candy with Frank. If David has 100 candies now, how many candies did David have at first?

After David gave half of his candies to Ethan, he had 100-3=<<100-3=97>>97 candies left.

Before David exchanged five candies with Frank, he had 97+5=<<97+5=102>>102 candies.
Before David gave half of his candies to Ethan, he had 102*2=<<102*2=204>>204 candies. Answer: \boxed{204}.