Cupcake Party
InterviewTime limit1sMemory limit1024 MB
Given R boxes of 8 cupcakes and S boxes of 3 cupcakes, find the number left after 28 students each take one.
- Level
Easy1 of 10
- Topics
- Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
A regular box holds 8 cupcakes, and a small box holds 3 cupcakes. A class has 28 students, and there are at least 28 cupcakes in total. Determine how many cupcakes are left over after each student gets one cupcake.

Input
The input consists of two lines.
- The first line contains an integer , the number of regular boxes.
- The second line contains an integer , the number of small boxes.
Output
Output the number of cupcakes that are left over.