Masala #0700

Xotira 16 MB Vaqt 1000 ms
14

Uy ishi

Quvonchbek matematkani yaxshi bilganligi uchun ustozi unga "expression module" ga oid bo'lgan misol berdi. Misol quydagicha edi:

  • \((1^n+2^n+3^n+4^n) \space mod \space5\)

Quydagi ifodani natijasini olishda Quvonchbekga yordam bering. 


Kiruvchi ma'lumotlar:

Yagona qatorda n(\(0\leq n \leq 10^{10^5}\) butun son kiritiladi.


Chiquvchi ma'lumotlar:

Masala javobini chop eting.


Misollar
# input.txt output.txt
1
4
4
Izoh:
  1. \((1^4+2^4+3^4+4^4) \space \text{mod} \space 5 \text{=}(1+16+81+256) \space \text{mod}\space =354 \space \text{mod} \space 5 = 4\)