P1704 [CF401E] Olympic Games
省选
题目描述

This problem was deleted from the contest, because it was used previously at another competition.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 1 1 2 100
样例输出
6