<|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
 Suppose that  $(a_1,\ldots,a_{20})$  and  $(b_1,\ldots,b_{20})$  are two sequences of integers such that the sequence  $(a_1,\ldots,a_{20},b_1,\ldots,b_{20})$  contains each of the numbers  $1,\ldots,40$  exactly once.  What is the maximum possible value of the sum \[\sum_{i=1}^{20}\sum_{j=1}^{20}\min(a_i,b_j)?\] 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
400
Suppose that  $(a_1,\ldots,a_{20})$  and  $(b_1,\ldots,b_{20})$  are two sequences of integers such that the sequence  $(a_1,\ldots,a_{20},b_1,\ldots,b_{20})$  contains each of the numbers  $1,\ldots,40$  exactly once.  What is the maximum possible value of the sum \[\sum_{i=1}^{20}\sum_{j=1}^{20}\min(a_i,b_j)?\]
test