#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; typedef pair P; ll a[]={3, 20, 696, 4059, 23660, 137903, 4684659, 27304196, 159140519ll, 5406093003ll, 31509019100ll, 183648021599ll, 6238626641379ll, 36361380737780ll, 211929657785303ll, 1235216565974040ll, 41961001862379596ll, 244566641436218639ll}; ll c[]={5, 29, 985, 5741, 33461, 195025, 6625109, 38613965, 225058681ll, 7645370045ll, 44560482149ll, 259717522849ll, 8822750406821ll, 51422757785981ll, 299713796309065ll, 1746860020068409ll, 59341817924539925ll, 345869461223138161ll}; int main() { int x; cin>>x; cout<