#include <iostream>
#include<bits/stdc++.h>
using namespace std;
// #Theory #Math
long long fast_exp(long long base,long long exp){
long long MOD=10000009;
if(exp==1){
return base%MOD;
}else{
if(exp%2==0){
long long base1=pow(fast_exp(base,exp/2),2);
return base1%MOD;
}else{
long long base2=base*pow(fast_exp(base,(exp-1)/2),2);
return base2%MOD;
}
}
}
int main() {
cout << fast_exp (2,5);
return 0;
}