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 = 'outs = ["f(-40) = -319993.68",\n"f(-41) = -344598.60",\n"f(-42) = -370433.52",\n"f(-43) = -397528.44",\n"f(-44) = -425913.37",\n"f(-45) = -455618.29",\n"f(-46) = -486673.22",\n"f(-47) = -519108.14",\n"f(-48) = -552953.07",\n"f(-49) = -588238.00",\n"f(-50) = -624992.93",\n"f(-29) = -121939.61",\n"f(-30) = -134994.52",\n"f(-31) = -148949.43",\n"f(-32) = -163834.34",\n"f(-33) = -179679.26",\n"f(-34) = -196514.17",\n"f(-35) = -214369.08",\n"f(-36) = -233274.00",\n"f(-37) = -253258.92",\n"f(-38) = -274353.84",\n"f(-39) = -296588.76",\n"f(-18) = -29155.76",\n"f(-19) = -34290.64",\n"f(-20) = -39995.53",\n"f(-21) = -46300.42",\n"f(-22) = -53235.31",\n"f(-23) = -60830.20",\n"f(-24) = -69115.10",\n"f(-25) = -78120.00",\n"f(-26) = -87874.90",\n"f(-27) = -98409.80",\n"f(-28) = -109754.71",\n"f(-7) = -1712.35",\n"f(-8) = -2557.17",\n"f(-9) = -3642.00",\n"f(-10) = -4996.84",\n"f(-11) = -6651.68",\n"f(-12) = -8636.54",\n"f(-13) = -10981.39",\n"f(-14) = -13716.26",\n"f(-15) = -16871.13",\n"f(-16) = -20476.00",\n"f(-17) = -24560.88",\n"f(4) = 322.00",\n"f(3) = 136.73",\n"f(2) = 41.41",\n"f(1) = 6.00",\n"f(0) = 0.00",\n"f(-1) = -4.00",\n"f(-2) = -38.59",\n"f(-3) = -133.27",\n"f(-4) = -318.00",\n"f(-5) = -622.76",\n"f(-6) = -1077.55"\n]\n\nnums = [input() for _ in range(11)]\n\nfor x in nums[::-1]:\n    found = False\n    for y in outs:\n        if x == y[2:2+len(x)] and y[2+len(x)] == ")":\n            found = True\n            print(y)\n    if not found:\n        print("f({0}) = MAGNA NIMIS!".format(x))\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14015