#include using namespace std; int main(){ int N,M; cin >> N >>M; N%=10; M%=4; int ans=N; int i; for(i=1;i