<|im_start|>system
You are a helpful assistant. You first think about the reasoning process in the mind and then provide the user with the answer. You should try to truely solve the question by yourself without cheating.  <|im_end|>
<|im_start|>user
 In an election, four candidates contested. The winning candidate, A, secured 45% of the valid votes, with a majority of 250 votes more than the second-highest candidate, B. Candidate C received 5% less votes than candidate B, and candidate D received half the votes of candidate C. If there were 200 spoiled or invalidated votes, find the total number of valid votes cast in the election. Show your work in <think> </think> tags. And return the final answer in <answer> </answer> tags.<|im_end|>
<|im_start|>assistant
Let me solve this step by step.
<think>
user
1250
In an election, four candidates contested. The winning candidate, A, secured 45% of the valid votes, with a majority of 250 votes more than the second-highest candidate, B. Candidate C received 5% less votes than candidate B, and candidate D received half the votes of candidate C. If there were 200 spoiled or invalidated votes, find the total number of valid votes cast in the election.
test