[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]:
n, i, j, ans = long long with ans = 9999999999999 and a,db = two dimensional arrays of long longs with the sizes 201 and 201 each
define the main function
    read n
    print "+------------------------+"
    if n is greater than 2
        decrement n
        print '|'
        for i = 1 to 11 inclusive
            if (n + 2) / 3 is greater or equal to i
                print "O."
            else
                print "#."
        end of the block
        print "|D|)"
        print '|'
        for i = 1 to 11 inclusive
            if (n + 1) / 3 is greater or equal to i
                print "O."
            else
                print "#."
        end of the block
        print "|.|"
        print "|O.......................|"
        print '|'
        for i = 1 to 11 inclusive
            if n / 3 is greater or equal to i
                print "O."
            else
                print "#."
        end of the block
        print "|.|)"
    else
        print '|'
        if n is greater than 0
            print "O."
        else
            print "#."
        print "#.#.#.#.#.#.#.#.#.#.|D|)"
        print '|'
        if n is greater than 1
            print "O."
        else
            print "#."
        print "#.#.#.#.#.#.#.#.#.#.|.|"
        print "|#.......................|"
        print "|#.#.#.#.#.#.#.#.#.#.#.|.|)"
    end of the block
    print "+------------------------+"
    return to indicate successful execution
end of the block

[CODE]:

long long n, a[201][201], i, j, dp[201][201], ans = 9999999999999;
int main() {
    cin >> n;
    cout << "+------------------------+" << endl;
    if (n >= 3) {
        n -= 1;
        cout << '|';
        for (i = 1; i <= 11; i++) {
            if ((n + 2) / 3 >= i)
                cout << "O.";
            else
                cout << "#.";
        }
        cout << "|D|)" << endl;
        cout << '|';
        for (i = 1; i <= 11; i++) {
            if ((n + 1) / 3 >= i)
                cout << "O.";
            else
                cout << "#.";
        }
        cout << "|.|" << endl;
        cout << "|O.......................|" << endl;
        cout << '|';
        for (i = 1; i <= 11; i++) {
            if (n / 3 >= i)
                cout << "O.";
            else
                cout << "#.";
        }
        cout << "|.|)" << endl;
    } else {
        cout << '|';
        if (n >= 1)
            cout << "O.";
        else
            cout << "#.";
        cout << "#.#.#.#.#.#.#.#.#.#.|D|)" << endl;
        cout << '|';
        if (n >= 2)
            cout << "O.";
        else
            cout << "#.";
        cout << "#.#.#.#.#.#.#.#.#.#.|.|" << endl;
        cout << "|#.......................|" << endl;
        cout << "|#.#.#.#.#.#.#.#.#.#.#.|.|)" << endl;
    }
    cout << "+------------------------+" << endl;
    return 0;
}