#include using lint=long long; void cmx(lint&x,lint y){if(x>n; std::vectora; for(;n;n/=10)a.push_back(n%10); std::reverse(a.begin(),a.end()); n=a.size(); lint N=1ll<dp(N); for(lint i=0;i>j&1)||!(i>>k&1)||!(i>>l&1) ||a.at(j)==a.at(k)||a.at(k)!=a.at(l))continue; cmx(dp.at(i), dp.at(i^1<