Rohan and Chocolates

0

0 votes
Easy
Problem

Rohan loves chocolates. On Valentine's Day he decided to buy a diary milk chocolate for himself :P (That is how life for some people). His coder friend Subh walks in and asks him to find out the minimum number of square sized chocolate bars he can cut out of the chocolate bar. Help Rohan in figuring out the minimum number of square-sized chocolate bars.

Input Format

FIrst line has 2 integers which are number of rows and columns separated by spaces.

Output Format

Just The Answer which should be in integer format.

**NOTE**: This question has no partial marking
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

So the answer is 3. The following are the squares formed that comprise the answer for minimum number of squares.

  1. 2*2 square - 1

  2. 1*1 squares - 2

Editor Image

?