#include <iostream>
using namespace std;
int main() {
long long A, B, C, D;
cin >> A >> B >> C >> D; // Read the four numbers
// Extract the last two digits of each number
int a_last = A % 100;
int b_last = B % 100;
int c_last = C % 100;
int d_last = D % 100;
// Calculate the product of the last two digits
int product_last_two = (a_last * b_last) % 100;
product_last_two = (product_last_two * c_last) % 100;
product_last_two = (product_last_two * d_last) % 100;
// Print the result
cout << product_last_two << endl;
return 0;
}
ICAgICNpbmNsdWRlIDxpb3N0cmVhbT4KICAgICAKICAgIHVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAgICAgCiAgICBpbnQgbWFpbigpIHsKICAgICAgICBsb25nIGxvbmcgQSwgQiwgQywgRDsKICAgICAgICBjaW4gPj4gQSA+PiBCID4+IEMgPj4gRDsgLy8gUmVhZCB0aGUgZm91ciBudW1iZXJzCiAgICAgCiAgICAgICAgLy8gRXh0cmFjdCB0aGUgbGFzdCB0d28gZGlnaXRzIG9mIGVhY2ggbnVtYmVyCiAgICAgICAgaW50IGFfbGFzdCA9IEEgJSAxMDA7CiAgICAgICAgaW50IGJfbGFzdCA9IEIgJSAxMDA7CiAgICAgICAgaW50IGNfbGFzdCA9IEMgJSAxMDA7CiAgICAgICAgaW50IGRfbGFzdCA9IEQgJSAxMDA7CiAgICAgCiAgICAgICAgLy8gQ2FsY3VsYXRlIHRoZSBwcm9kdWN0IG9mIHRoZSBsYXN0IHR3byBkaWdpdHMKICAgICAgICBpbnQgcHJvZHVjdF9sYXN0X3R3byA9IChhX2xhc3QgKiBiX2xhc3QpICUgMTAwOwogICAgICAgIHByb2R1Y3RfbGFzdF90d28gPSAocHJvZHVjdF9sYXN0X3R3byAqIGNfbGFzdCkgJSAxMDA7CiAgICAgICAgcHJvZHVjdF9sYXN0X3R3byA9IChwcm9kdWN0X2xhc3RfdHdvICogZF9sYXN0KSAlIDEwMDsKICAgICAKICAgICAgICAvLyBQcmludCB0aGUgcmVzdWx0CiAgICAgICAgY291dCA8PCBwcm9kdWN0X2xhc3RfdHdvIDw8IGVuZGw7CiAgICAgCiAgICAgICAgcmV0dXJuIDA7CiAgICB9