You cannot subtract cards directly from the iterator, because this is an expensive operation (in practice, it does --iter the required number of times). If you really want to do this, you can use the standard forward library function.
map<...>::iterator end = final.end();
std::advance(end, -window);
.