title: Print a single line the minimum number of operations required to complete the task
body: <p>as you see i am stuck in the below python code to find the desired output. I got the the output but it is not 2(Which is right output.)</p>
  <p>Anyone got some ropes. he want to make each of the rope as small as possible. The sequence of ropes has got some special property. Each rope has a unique length. The ropes are numbered 1 to N.
  We can choose M sized subsegment of the sequence and cut all the ropes present in the subsegment to the length of the minimum length rope present in that subsegment.
  The first line of input contains a single integer M denoting the size of the subarray we can pick in any operation. the next line contains a single integer N denoting the number of ropes. Then N lines follow where each line contains a single integer denoting the length of the rope</p>
  <p><strong>import collections</strong></p>
  <pre><code>&gt;&gt;&gt; class Solution:
  '''Defining function for min operation'''
          def minOperations(self, sizeOfSubarray, lengthsOfRopes):
              #write code here
      ///writing code
      def main():
          R = input()
          R = int(R)
          k = input()
          k = int(k)
          res = []
          '''Using loop for input'''
          for i in range(k):
              res.append(int(input().strip()))
          ret = Solution().minOperations(R,res)
          print(ret)
      if __name__=='__main__':
          main()
   
           
       '''//input
         4
         5
         2
         1
         3 
         4 
         5 
      
  </code></pre>
  <p>//output
  2</p>