#include <regex>
#include <string>
#include <iostream>
using namespace std;

int main() {
	std::regex expression(R"(am\s+(\d+))");
	std::smatch match;
	std::string what("I am 5 years old.");
	if (regex_search(what, match, expression))
	{
	     cout << match.str(1) << endl;
	}
    return 0;
}