#include <iostream>
using namespace std;
int main() {
long long a, b, c, d ,f;
cin >> a >> b >> c >> d;
a = a % 100;
b = b % 100;
c = c% 100;
d = d% 100;
f = a * b * c * d;
f = f % 100;
if(f<=9)cout<<"0"<<f;
else cout<<f;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKICAgIGxvbmcgbG9uZyBhLCBiLCBjLCBkICxmOwogICAgY2luID4+IGEgPj4gYiA+PiBjID4+IGQ7CiAgICBhID0gYSAlIDEwMDsKICAgIGIgPSBiICUgMTAwOwogICAgYyA9IGMlIDEwMDsKICAgIGQgPSBkJSAxMDA7CiAgICBmID0gYSAqIGIgKiBjICogZDsKICAgIGYgPSBmICUgMTAwOwogICAgaWYoZjw9OSljb3V0PDwiMCI8PGY7CiAgICBlbHNlIGNvdXQ8PGY7CiAgICAKICAgIHJldHVybiAwOwp9