#K95832. Minimum Operations to Convert Grid to Ones

    ID: 38951 Type: Default 1000ms 256MiB

Minimum Operations to Convert Grid to Ones

Minimum Operations to Convert Grid to Ones

You are given two integers \(n\) and \(k\) which define a grid of size \(n \times k\) where all cells are initially 0. In one operation, you can select any cell; this operation toggles every cell in the grid from 0 to 1 (or vice versa). The goal is to make every cell in the grid equal to 1.

It turns out that regardless of the grid dimensions, one operation is always sufficient to achieve the goal.

Your task is to output the minimum number of operations needed.

inputFormat

The input consists of a single line with two space-separated integers (n) and (k), representing the number of rows and columns of the grid respectively.

outputFormat

Output a single integer: the minimum number of operations required to turn the grid, initially filled with zeros, into a grid full of ones.## sample

2 2
1