#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N (1000000000+7) //#define N 998244353 #define INF 1e16 typedef long long ll; typedef pair P; const int inf = 1e8; int main() { ll A; cin>>A; ll ans = A; ll t = 1; ll num = 0; while(t