#include <iostream>

using namespace std;

int main() {
    long long a , b ,c ,d;
    cin >> a >> b >> c >> d;

    //calc product
    long long product = a * b * c * d;

    //get the last two digits
    int lastTwoDigits = product % 100;

    //print result
    cout << lastTwoDigits << endl;
    
    return 0;

}