#include <iostream>
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ll a, b, c, d;
cin >> a >> b >> c >> d;
a %= 100;
b %= 100;
c %= 100;
d %= 100;
ll product = a;
product = (product * b) % 100;
product = (product * c) % 100;
product = (product * d) % 100;
cout << product;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4udGllKE5VTEwpOwoKICAgICNpZm5kZWYgT05MSU5FX0pVREdFCiAgICBmcmVvcGVuKCJpbnB1dC50eHQiLCAiciIsIHN0ZGluKTsKICAgIGZyZW9wZW4oIm91dHB1dC50eHQiLCAidyIsIHN0ZG91dCk7CiAgICAjZW5kaWYKCiAgICBsbCBhLCBiLCBjLCBkOwogICAgY2luID4+IGEgPj4gYiA+PiBjID4+IGQ7CgogICAgCiAgICBhICU9IDEwMDsKICAgIGIgJT0gMTAwOwogICAgYyAlPSAxMDA7CiAgICBkICU9IDEwMDsKCiAgICAKICAgIGxsIHByb2R1Y3QgPSBhOwogICAgcHJvZHVjdCA9IChwcm9kdWN0ICogYikgJSAxMDA7ICAKICAgIHByb2R1Y3QgPSAocHJvZHVjdCAqIGMpICUgMTAwOyAgCiAgICBwcm9kdWN0ID0gKHByb2R1Y3QgKiBkKSAlIDEwMDsgIAoKICAgIGNvdXQgPDwgcHJvZHVjdDsgCgogICAgcmV0dXJuIDA7Cn0K