Simple Solution by Python 3
Find the pattern.\n\nWhen n = 5,\n1 3 5 7 9\n1 4 5 6 9\n1 5 5 5 9\n2 5 5 5 8\n3 5 5 5 7\n4 5 5 5 6\n5 5 5 5 5\n-> 2 + 4 = 6\n\nWhen n = 6,\n1 3 5 7 9 11\n1 3 6 
Find the pattern.\n\nWhen `n = 5`,\n1 3 5 7 9\n1 **4** 5 **6** 9\n1 **5** 5 **5** 9\n**2** 5 5 5 **8**\n**3** 5 5 5 **7**\n**4** 5 5 5 **6**\n**5** 5 5 5 **5**\n-> 2 + 4 = 6\n\nWhen `n = 6`,\n1 3 5 7 9 11\n1 3 **6 6** 9 11\n1 **4** 6 6 **8** 11\n1 **5** 6 6 **7** 11\n1 **6** 6 6 **6** 11\n**2** 6 6 6 6 **10**\n**3** 6 6 6 6 **9**\n**4** 6 6 6 6 **8**\n**5** 6 6 6 6 **7**\n**6** 6 6 6 6 **6**\n-> 1 + 3 + 5 = 9\n\n```\nclass Solution:\n    def minOperations(self, n: int) -> int:\n        return ((n + 1) // 2) * (n // 2)\n```\n
['Python3']