[TASK]:
You will be given lines of pseudocode, your task is to write the corresponding C++ code. The pseudocode will provide detailed description of the c++ code line by line. The pseudocode is garanteed to be correct and complete.

[INSTRUCTION]:
The following libraries are already included in the code.
```cpp
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <fstream>
#include <climits>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <bitset>
using namespace std;
```
Do not include them in your code again. Please surround your code with ```cpp and ``` markers. Note that the code should correspond to the pseudocode line by line.

[PSEUDOCODE]:
create integer k
define the main function
    read k
    print "+------------------------+\n"
    print "|"
    for i = 0 to 11 exclusive
        if i is 0
            if i + 1 is less than or equal to k
                print "O."
            else
                print "#."
        else
            if i * 3 + 2 is less than or equal to k
                print "O."
            else
                print "#."
        end of the block
    end of the block
    print "|D|)\n"
    print "|"
    for i = 0 to 11 exclusive
        if i is 0
            if i + 2 is less than or equal to k
                print "O."
            else
                print "#."
        else
            if i * 3 + 3 is less than or equal to k
                print "O."
            else
                print "#."
        end of the block
    end of the block
    print "|.|\n"
    print "|"
    for i = 0 to 11 exclusive
        if 3 is less than or equal to k and i is 0
            print "O."
        else if i is 0
            print "#."
        else
            print ".."
    end of the block
    print "..|\n"
    print "|"
    for i = 0 to 11 exclusive
        if i is 0
            if i + 4 is less than or equal to k
                print "O."
            else
                print "#."
        else
            if i * 3 + 4 is less than or equal to k
                print "O."
            else
                print "#."
        end of the block
    end of the block
    print "|.|)\n"
    print "+------------------------+\n"
    return to indicate successful execution
end of the block

[CODE]:

int k;
int main() {
    cin >> k;
    cout << "+------------------------+\n";
    cout << "|";
    for (int i = 0; i < 11; i++) {
        if (i == 0) {
            if (i + 1 <= k)
                cout << "O.";
            else
                cout << "#.";
        } else {
            if ((i)*3 + 2 <= k)
                cout << "O.";
            else
                cout << "#.";
        }
    }
    cout << "|D|)\n";
    cout << "|";
    for (int i = 0; i < 11; i++) {
        if (i == 0) {
            if (i + 2 <= k)
                cout << "O.";
            else
                cout << "#.";
        } else {
            if ((i)*3 + 3 <= k)
                cout << "O.";
            else
                cout << "#.";
        }
    }
    cout << "|.|\n";
    cout << "|";
    for (int i = 0; i < 11; i++) {
        if (3 <= k && i == 0)
            cout << "O.";
        else if (i == 0)
            cout << "#.";
        else
            cout << "..";
    }
    cout << "..|\n";
    cout << "|";
    for (int i = 0; i < 11; i++) {
        if (i == 0) {
            if (i + 4 <= k)
                cout << "O.";
            else
                cout << "#.";
        } else {
            if ((i)*3 + 4 <= k)
                cout << "O.";
            else
                cout << "#.";
        }
    }
    cout << "|.|)\n";
    cout << "+------------------------+\n";
    return 0;
}