Simple And helpful || o(1) || easy
<++++++++ Press upvote Button !!!!!!!!!\n\nclass Solution {\npublic:\n    int minOperations(int n) {\n        \n        if(n==1)\n            return 0;\n       
**<++++++++ Press upvote Button !!!!!!!!!**\n```\nclass Solution {\npublic:\n    int minOperations(int n) {\n        \n        if(n==1)\n            return 0;\n        \n        bool parity= n%2 == 0 ? true : false;\n        \n        int a = parity== true? 1 : 0,  // This will look similar Like\n        d= 2,                          // An = a +  (n-1)d\n        N= ceil(n*1.0/2),              // Sn = n/2( a + An )       \n        An= a + (N-1)*d,               // exactly like arthematic operation\n        \n        Sn= (( N)*( a + An ))/2;\n        \n        return Sn;\n        \n    }\n};\n```\n![image](https://assets.leetcode.com/users/images/77767fb7-0c55-4695-a6ee-af693e2a67f2_1654887231.2400758.jpeg)\n
['Math', 'C', 'C++']