#include <iostream>
#include <algorithm>
#include "string"
using namespace std;
long GetResult(int n)
{
long count;
if (n < 6)
{
return 0;
}
else
{
count = pow(2, (n - 6));
count = count % 6666666;
}
return count;
}
int main()
{
cout << GetResult(8);
system("pause");
return 0;
}