[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]:
define the main function
    declare ints n and t
    read user input to n and t
    new string variable s
    read variable s from the input
    define new integer called pointPos = -1
    declare integer variable with name start = -1
    start for loop from i = 0 to length of s exclusive incrementing i
        if pointPos != -1 and s[i] - '0' >= 5
            set start to i
            break
        end of the block
        if s[i] is equal to '.', set the value of pointPos to i
    end of the block
    if start != - 1
        define new boolean called next with value true
        while start > pointPos and next and t > 0
            if start - pointPos is equal to 1
                create integer variable nextVal = s[start - 2] - '0' + 1
                if nextVal is equal to 10
                    set the value of s[start - 2] to '0'
                else
                    assign nextVal + '0' to s[start - 2]
                    set the value of next to false
                end of the block
            else
                create integer variable nextVal with value s[start-1] - '0' + 1
                if nextVal < 5 or t - 1 = 0, assign false to next
                assign the new value = nextVal + '0' to s[start - 1]
            end of the block
            decrement start
            decrement t
        end of the block
        remove elements from the start + 1 to the end of s
        if *(--s.end()) == '.', remove last element of s
        change start to pointPos - 1
        while next and start >= 0
            if start is equal to 0
                insert '0' to the start of s
                set start to 1
            end of the block
            declare integer variable with name nextVal and value s[start-1] - '0' + 1
            if nextVal is equal to 10
                assign '0' to s[start - 1]
            else
                assign the new value = nextVal + '0' to s[start - 1]
                set next to false
            end of the block
            decrement start
        end of the block
    end of the block
    print s to the standard output
    return to indicate successful execution
end of the block

[CODE]:

int main() {
    int n, t;
    cin >> n >> t;
    string s;
    cin >> s;
    int pointPos = -1;
    int start = -1;
    for (int i = 0; i < s.size(); i++) {
        if (pointPos != -1 && s[i] - '0' >= 5) {
            start = i;
            break;
        };
        if (s[i] == '.') pointPos = i;
    }
    if (start != -1) {
        bool next = true;
        while (start > pointPos && next && t > 0) {
            if (start - pointPos == 1) {
                int nextVal = s[start - 2] - '0' + 1;
                if (nextVal == 10)
                    s[start - 2] = '0';
                else {
                    s[start - 2] = nextVal + '0';
                    next = false;
                }
            } else {
                int nextVal = s[start - 1] - '0' + 1;
                if (nextVal < 5 || t - 1 == 0) next = false;
                s[start - 1] = nextVal + '0';
            }
            --start;
            --t;
        }
        s.erase(s.begin() + start + 1, s.end());
        if (*(--s.end()) == '.') s.erase(--s.end());
        start = pointPos - 1;
        while (next && start >= 0) {
            if (start == 0) {
                s.insert(s.begin(), '0');
                start = 1;
            }
            int nextVal = s[start - 1] - '0' + 1;
            if (nextVal == 10)
                s[start - 1] = '0';
            else {
                s[start - 1] = nextVal + '0';
                next = false;
            }
            --start;
        }
    }
    cout << s << endl;
    return 0;
}