






"""simple docstring"""






from math import ceil



def       _A    (__a = 10_01							)				-> int:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						List[Any]							=	1

    for i in range(1					,       int(ceil(n / 2.0							)							)							):
        SCREAMING_SNAKE_CASE_   :						Tuple							=	2 * i + 1
        SCREAMING_SNAKE_CASE_   :						List[str]							=	2 * i
        SCREAMING_SNAKE_CASE_   :						str							=	total + 4 * odd**2 - 6 * even

    return total


if __name__ == "__main__":
  import sys

  if len(sys.argv) == 1:
    print(solution())
  else:
    try:
      UpperCAmelCase_     :				Tuple         =				int(sys.argv[1])
      print(solution(n))
    except ValueError:
      print("""Invalid entry - please enter a number""")










"""simple docstring"""






from __future__ import annotations

import requests



def       _A    (__a							)				-> dict:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						Any							=	f'https://hacker-news.firebaseio.com/v0/item/{story_id}.json?print=pretty'
    return requests.get(__a							).json()



def       _A    (__a = 10							)				-> list[dict]:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						Any							=	'''https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty'''
    SCREAMING_SNAKE_CASE_   :						Dict							=	requests.get(__a							).json()[:max_stories]
    return [get_hackernews_story(__a							) for story_id in story_ids]



def       _A    (__a = 10							)				-> str:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_   :						Tuple							=	hackernews_top_stories(__a							)
    return "\n".join('''* [{title}]({url})'''.format(**__a							) for story in stories							)


if __name__ == "__main__":
  print(hackernews_top_stories_as_markdown())


