Alyona and Numbers

题意翻译

给定两个数n, m(1 <= n,m <= 10000001<=n,m<=1000000)。分别从1~n, 1~m中选择两个数,使它们的和为5的倍数,求这样的数对共有多少(a+b, b+a视为不同的数对)。 ``` 样例1解释: 输入:6 12 1 2 3 4 5 6 1 2 3 4 5 6 7 8 9 10 11 12 能被5整除的分别有 1+4, 1+9 2+3, 2+8 3+2, 3+7, 3+12 4+1, 4+6, 4+11 5+5, 5+10 6+4, 6+9 共14对 ```

题目描述

After finishing eating her bun, Alyona came up with two integers $ n $ and $ m $ . She decided to write down two columns of integers — the first column containing integers from $ 1 $ to $ n $ and the second containing integers from $ 1 $ to $ m $ . Now the girl wants to count how many pairs of integers she can choose, one from the first column and the other from the second column, such that their sum is divisible by $ 5 $ . Formally, Alyona wants to count the number of pairs of integers $ (x,y) $ such that $ 1<=x<=n $ , $ 1<=y<=m $ and ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF682A/bb850c8c10ee7a9c00e5b1ff3da7605a7415f98c.png) equals $ 0 $ . As usual, Alyona has some troubles and asks you to help.

输入输出格式

输入格式


The only line of the input contains two integers $ n $ and $ m $ ( $ 1<=n,m<=1000000 $ ).

输出格式


Print the only integer — the number of pairs of integers $ (x,y) $ such that $ 1<=x<=n $ , $ 1<=y<=m $ and $ (x+y) $ is divisible by $ 5 $ .

输入输出样例

输入样例 #1

6 12

输出样例 #1

14

输入样例 #2

11 14

输出样例 #2

31

输入样例 #3

1 5

输出样例 #3

1

输入样例 #4

3 8

输出样例 #4

5

输入样例 #5

5 7

输出样例 #5

7

输入样例 #6

21 21

输出样例 #6

88

说明

Following pairs are suitable in the first sample case: - for $ x=1 $ fits $ y $ equal to $ 4 $ or $ 9 $ ; - for $ x=2 $ fits $ y $ equal to $ 3 $ or $ 8 $ ; - for $ x=3 $ fits $ y $ equal to $ 2 $ , $ 7 $ or $ 12 $ ; - for $ x=4 $ fits $ y $ equal to $ 1 $ , $ 6 $ or $ 11 $ ; - for $ x=5 $ fits $ y $ equal to $ 5 $ or $ 10 $ ; - for $ x=6 $ fits $ y $ equal to $ 4 $ or $ 9 $ . Only the pair $ (1,4) $ is suitable in the third sample case.