output_description: Print the value a + a^2 + a^3 as an integer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      a
attempt: n, m, k = map(int, input().split())
  a = list(map(int, input().split()))
  b = list(map(int, input().split()))
  now = b[0]
  ans = 0
  for i in range(len(a) + len(b)):
      if now >= k:
          break
      else:
          if len(a) == 0:
              ans += 1
              now += b[0]
              b.remove(b[0])
          elif len(b) == 0:
              ans += 1
              now += a[0]
              a.remove(a[0])
          else:
              if a[0] < now:
                  ans += 1
                  now += a[0]
                  a.remove(a[0])
              else:
                  now = b[1]
                  ans += 1
                  now += b[0]
                  b.remove(b[0])
  print(ans)
  
problem_description: Statement
  
  Given an integer a as input, print the value a + a^2 + a^3.
samples: [{"input": "2", "output": "14\n    \n\nWhen a = 2, we have a + a^2 + a^3 = 2 + 2^2 + 2^3 = 2 + 4 + 8 = 14.\n\nPrint the answer as an input. Outputs such as `14.0` will be judged as\nincorrect.\n\n* * *"}, {"input": "10", "output": "1110"}]