#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
int a, b,c,d;
cin >> a >> b >> c >> d;
ll product=(a*b*c*d)%100;
cout << product ;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KI2RlZmluZSBsbCBsb25nIGxvbmcKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4udGllKE5VTEwpOwoKICAgICNpZm5kZWYgT05MSU5FX0pVREdFCiAgICBmcmVvcGVuKCJpbnB1dC50eHQiLCAiciIsIHN0ZGluKTsKICAgIGZyZW9wZW4oIm91dHB1dC50eHQiLCAidyIsIHN0ZG91dCk7CiAgICAjZW5kaWYKCiAgICBpbnQgYSwgYixjLGQ7CiAgICBjaW4gPj4gYSA+PiBiID4+IGMgPj4gZDsKICAgIGxsIHByb2R1Y3Q9KGEqYipjKmQpJTEwMDsKICAgIGNvdXQgPDwgcHJvZHVjdCA7CgogICAgcmV0dXJuIDA7Cn0K