#include #include using namespace std; int main() { int N; string tmp = "142857"; cin >> N; if (N == 0) cout << 0; else { cout << "0."; for (int i = 0; i < N / 6; ++i) cout << tmp; for (int i = 0; i < N % 6; ++i) cout << tmp[i]; } }