Treasury Secretary Jack Lew told Congress Tuesday that the U.S. government has started to use the last of its "extraordinary measures" to ensure it stays below the debt ceiling.

"There are no other legal and prudent options to extend the nation's borrowing authority," Lew wrote. The Treasury Department "continues to believe" that it will run out of extraordinary measures no later than Oct. 17, he added.

At that point, Treasury will only be able to pay the bills that come due with two things -- the $30 billion in cash that Lew estimates Treasury will have on hand in mid-October, plus the revenue coming in every day.

Since daily payments and daily revenue inflows vary from day to day, it's impossible to predict exactly when Treasury will come up short and be unable to pay everything that's due, putting the country at risk of default.

The Congressional Budget Office projects that day could come between Oct. 22 and Oct. 31, if Congress doesn't raise the debt ceiling, which currently stands at $16.699 trillion.

Lew's letter came at the end of Day One of a government shutdown, the first in nearly two decades.

With Congress unable to agree on a deal to fund the government past Monday, more than 800,000 federal workers are being furloughed without pay this week. In addition, government agencies are curtailing their services and federal museums, parks and monuments are closed to the public.

Shutdown and debt ceiling loom large

It's unclear how long a shutdown will last because there's no sign that Congress is any closer to reaching a deal. A prolonged shutdown could alter Lew's debt ceiling "X" date.

"Although the current lapse in appropriations creates some additional uncertainty, we do not believe it will impact our projections materially unless it continues for an extended period of time," Lew wrote.