2351: Cupcake Party

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:11 解决:7

题目描述

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.

幼儿园有 28 个小朋友,因此需要 28 个蛋糕。

一个大盒子可以装 8 块蛋糕,一个小盒子可以装 3 块蛋糕。现在有 n 个大盒子和 m 个小盒子,现在给每个小朋友一块蛋糕,问能剩下几个?


输入

The input consists of two lines.
• The first line contains an integer n ≥ 0, representing the number of regular boxes.
• The second line contains an integer m ≥ 0, representing the number of small boxes.

输入共两行:
第一行:包含一个整数 n0,表示大盒子的数量。
第二行:包含一个整数 m0,表示小盒子的数量。

输出

Output the number of cupcakes that are left over.
一行,表示剩余蛋糕的数量。

样例输入 复制

2
5

样例输出 复制

3