The construction team needs to use a 31-meter-long water pipe. There are two types of water pipes with a length of 3 meters and 5 meters. How much is the minimum cost of purchasing water pipes during installation?
修建队要按照一条长31米的自来水管，现有3米和5米长两种规格的水管使用，已知3米长的水管每根32元，5米长的水管每根50元，那么安装时购买水管至少要用多少元．
<gadget id="calculator">50 * 5</gadget>
<output>250</output>

<gadget id="calculator">2 * 32</gadget>
<output>64</output>

<gadget id="calculator">250 + 64</gadget>
<output>314</output>

<result>314</result>