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

```

Measured memory_bytes: 15927