per nextum in unam tum XI conscribementis fac sic

    vestibulo perlegementum da varo.

    morde varo.

    seqis cumula varum.

cis



per nextum in unam tum XI conscribementis fac sic

    seqis decumulamenta da varo.

    varum privamentum fodementum da aresulto.

    varum tum III elevamentum tum V multiplicamentum da bresulto.

    aresultum tum bresultum addementum da resulto.



    si CD tum resultum non praestantiam fac sic

        dictum sic f(%d) = %.2f cis tum varum tum resultum egresso describe.

        novumversum egresso scribe.

    cis

    si CD tum resultum praestantiam fac sic

        dictum sic f(%d) = MAGNA NIMIS! cis tum varum egresso describe.

        novumversum egresso scribe.        

    cis

cis




-----Input-----

The input consists of several integers, one per line. Each integer is between -50 and 50, inclusive.


-----Output-----

As described in the problem statement.


-----Example-----
Input
0
1
-2
-3
-4
-5
-6
-7
-8
-9
10

Output
f(10) = MAGNA NIMIS!
f(-9) = -3642.00
f(-8) = -2557.17
f(-7) = -1712.35
f(-6) = -1077.55
f(-5) = -622.76
f(-4) = -318.00
f(-3) = -133.27
f(-2) = -38.59
f(1) = 6.00
f(0) = 0.00

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import re\n\ns = """\nper nextum in unam tum XI conscribementis fac sic\n    vestibulo perlegementum da varo.\n    morde varo.\n    seqis cumula varum.\ncis\n\nper nextum in unam tum XI conscribementis fac sic\n    seqis decumulamenta da varo.\n    varum privamentum fodementum da aresulto.\n    varum tum III elevamentum tum V multiplicamentum da bresulto.\n    aresultum tum bresultum addementum da resulto.\n\n    si CD tum resultum non praestantiam fac sic\n        dictum sic f(%d) = %.2f cis tum varum tum resultum egresso describe.\n        novumversum egresso scribe.\n    cis\n    si CD tum resultum praestantiam fac sic\n        dictum sic f(%d) = MAGNA NIMIS! cis tum varum egresso describe.\n        novumversum egresso scribe.        \n    cis\ncis\n""".strip()\nif False:\n    s = re.sub(r"\\bIII\\b", "3", s)\n    s = re.sub(r"\\bV\\b", "5", s)\n    s = re.sub(r"\\bXI\\b", "11", s)\n    s = re.sub(r"\\bCD\\b", "400", s)\n    s = re.sub(r"per (.*?) fac sic(.*?)\\ncis", r"for (\\1) {\\2\\n}", s, flags=re.DOTALL)\n    s = re.sub(r"\\bdictum sic (.*) cis(.*) egresso describe.", r\'printf("\\1"\\2)\', s)\n    s = re.sub(r"novumversum egresso scribe.", r\'print("\\\\n")\', s)\n    s = re.sub(r"si (.*?) fac sic(.*?)cis", r"if (\\1) {\\2}", s, flags=re.DOTALL)\n    s = re.sub(r".$", "", s)\n    s = re.sub(r" tum ", " ", s)\n    print(s)\n    return\n\na = []\nfor i in range(11):\n    a.append(int(input()))\nfor i in range(11):\n    var = a.pop()\n    aresult = abs(var) ** 0.5\n    bresult = (var ** 3) * 5\n    result = aresult + bresult\n    if 400 > result:\n        print("f({0:d}) = {1:.2f}".format(var, result))\n    else:\n        print("f({0:d}) = MAGNA NIMIS!".format(var))\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: