2383: Cupcake Party

Memory Limit:128 MB Time Limit:1.000 S
Creator:
Submit:7 Solved:6

Description

A regular box of cupcakes holds 8 cupcakes, while a small box holds 3 cupcakes. There are 28 students in a class and a total of at least 28 cupcakes. Your job is to determine how many cupcakes will be left over if each student gets one cupcake.
一个标准的纸杯蛋糕盒可以装 8 个纸杯蛋糕,而一个小盒子可以装 3 个纸杯蛋糕。有 28 名学生在一个班级中,总共至少有 28 个纸杯蛋糕。你的任务是确定,如果每个学生得到一个纸杯蛋糕,将会剩下多少个纸杯蛋糕。

Input

The input consists of two lines. 
• The first line contains an integer R ≥ 0, representing the number of regular boxes. 
• The second line contains an integer S ≥ 0, representing the number of small boxes.
输入由两行组成。
第一行包含一个整数 R ≥ 0,代表标准盒子的数量。 
第二行包含一个整数 S ≥ 0,代表小盒子的数量。

Output

Output the number of cupcakes that are left over.
输出剩余的纸杯蛋糕数量.

Sample Input

2
5

Sample Output

3

HINT

The total number of cupcakes is 2 × 8 + 5 × 3 which equals 31. Since there are 28 students,there are 3 cupcakes left over; 
纸杯蛋糕的总数是 2 × 8 + 5 × 3,等于 31。由于有 28 名学生,所以剩下 3 个纸杯蛋糕。

Source/Category