OPINION OF THE COURT
Jones, J.In defendant’s appeal arising from his convictions for health care fraud in the fourth degree and grand larceny in the third degree, the primary issue we address is the legal sufficiency of the evidence. This is the Court’s first opportunity to determine the nature of proof required for a conviction under the recently enacted health care fraud statute (Penal Law art 177 et seq.).* We conclude that defendant’s convictions are supported by legally sufficient evidence. Additionally, we resolve defendant’s question regarding his statutory right to a speedy trial in the People’s favor.
From November 2007 through May 2008, the New York City Police Department (NYPD) and the New York City Human Resources Administration (HRA) conducted a joint undercover investigation of NYC Pharmacy, Inc., a pharmacy located in upper Manhattan, based on information that prescription drugs were being sold at that location without prescriptions. Specifically, an NYPD undercover police officer made seven visits to the pharmacy where he posed as a customer and received pills from defendant or another pharmacy employee. As a result of the investigation, defendant was arrested and charged with *538health care fraud in the fourth degree (Penal Law §§ 177.05, 177.10), grand larceny in the third degree (Penal Law § 155.35), criminal diversion of prescription medications in the second degree (Penal Law § 178.20), and four counts of criminal diversion of prescription medications in the fourth degree (Penal Law § 178.10), for allegedly defrauding the HRA and its Medicaid benefits program of more than $3,000 and unlawfully dispensing prescription medications on seven separate occasions.
At trial, it was established that the investigation was conducted in two phases. During the first phase, the undercover officer—named “Pedro Gomez” (a pseudonym authorized to be used after Supreme Court held a Stanard hearing [see People v Stanard, 42 NY2d 74 (1977)])—visited the pharmacy on three occasions—November 15, 2007; November 21, 2007 and February 1, 2008—and requested the prescription drugs Amitriptyline and Clonidine from defendant in varying amounts in exchange for cash, but without providing a prescription on any of the three occasions. Gomez testified that on November 15th and 21st he was given two types of pills in varying amounts: pink pills stamped “2105V” and orange pills stamped “129.” He further testified that on February 1st, he received a “small orange . . . bottle [of] pills.”
Gomez visited the pharmacy four times during the second phase of the investigation—February 28, 2008; March 6, 2008; April 2, 2008 and May 21, 2008. For each of these visits, he used a Medicaid benefits card manufactured for purposes of furthering the undercover operation in the name of a fictitious woman named Ivonne Arroyo. Gomez was also supplied with prescriptions for Arroyo which were purportedly signed by a doctor. The prescriptions were generated by the Medicaid Fraud unit for this investigation. During each visit, Gomez handed defendant the Medicaid card and prescription(s) and defendant checked the Medicaid database where he found Arroyo’s name; Gomez then asked to be given Amitriptyline and Clonidine, in varying amounts, instead of the drugs listed in the prescriptions; defendant gave Gomez pills that were not consistent with the prescriptions, but billed Medicaid in accordance with the prescriptions. A brief summary of Gomez’s testimony concerning the details of these four visits follows.
On February 28, 2008, Gomez visited the pharmacy and presented a prescription for 30 20-milligram tablets of Zyprexa for Arroyo. He told the defendant that Arroyo was his wife and *539stated that he did not want Zyprexa; instead, he asked for 40 pills each of Amitriptyline and Clonidine, saying to defendant, “Come on I need to make a little money”; in addition, he mentioned to another pharmacy employee that he wanted the pills so he “could make money.” Gomez told defendant he had his wife’s Medicaid card, and defendant asked Gomez to sign a book on the counter and the back of the prescription. Gomez signed Arroyo’s name and was handed 40 orange pills stamped “129.”
A week later, on March 6, 2008, Gomez returned to the pharmacy and handed defendant a prescription for Arroyo for 30 tablets of 600-milligram Sustiva. He told defendant he wanted “the usual pills,” and defendant handed Gomez a brown paper bag with an orange bottle labeled Sustiva 600-milligrams. The bottle contained 40 orange pills stamped “GG 461.”
Gomez made another visit to the pharmacy on April 2, 2008. On that day, he brought three prescriptions for Arroyo into the pharmacy for 30 tablets of Epzicom, 120 300-milligram tablets of Prezista and a 60-day supply of Advair. He then asked defendant for “40 of my pills.” He also asked defendant for some Percocet tablets, but defendant told him he could not dispense that drug because it was “not . . . registered [i]n the computer.” Gomez signed Arroyo’s name in the book on the counter and on the back of the prescriptions, and defendant handed him a bottle which contained 40 pink pills with “2105V” stamped on them.
Finally, on May 21, 2008, Gomez returned to the pharmacy with two prescriptions. Although he could not recall what drugs were prescribed at trial, he testified that he asked for the two usual drugs. Defendant told Gomez that the prescriptions were “not properly registered in the computer” and that “[the prescription] has to be in the computer by the doctor in order to be dispersed” otherwise he “could not bill Medicaid for those prescriptions.” Instead, defendant sold Gomez 60 pills for cash.
Gomez never identified himself or provided identification to defendant during any of the transactions. Further, although Gomez counted and vouchered the pills he received after each of the seven visits to NYC Pharmacy, none of them were ever subjected to laboratory analysis.
The prosecution also called an investigator from the New York Office of the Inspector General to testify about a document from Medicaid’s electronic database which showed that NYC *540Pharmacy, Inc. had billed Medicaid for five Arroyo prescriptions. According to the testimony, Medicaid approved and made payment to the pharmacy in the amount of $3,073.47; that is, for the February 28, 2008 prescription, the amount paid was $706.55 (Zyprexa); for the March 6, 2008 prescription, the amount paid was $519.04 (Sustiva 600-milligram tablets); and for three prescriptions on April 2, 2008, the amounts paid were $884.28 (Prezista), $812.89 (Epzicom) and $150.71 (Advair).
At the conclusion of the prosecution’s case and again at the close of all proof, defendant, pursuant to CPL 290.10, moved for a trial order of dismissal on the grounds that: the evidence adduced at trial was legally insufficient as to the charges of health care fraud and grand larceny; and the prosecution failed to prove the nature of the pills Gomez had received. Supreme Court reserved decision on the motions until after the jury verdict. After deliberations, the jury convicted defendant of grand larceny in the third degree and health care fraud in the fourth degree for his activities related to the February 28, March 6, and April 2, 2008 transactions. Defendant was also convicted of five counts of criminal diversion of prescription medications in the fourth degree.
Supreme Court, citing deficiencies in the proof, dismissed all five criminal diversion counts (24 Misc 3d 1231 [A], 2009 NY Slip Op 51685[U] [2009]). In addition, the court denied defendant’s motion for dismissal of the grand larceny and health care fraud counts, reasoning that “[t]he entire amount of this reimbursement was wrongfully and fraudulently obtained, since no medications were ever given to the . . . woman named in the five prescriptions” (2009 NY Slip Op 51685[U], *5).
On appeal, defendant argued that the trial evidence was legally insufficient to support his grand larceny and health care fraud convictions, and that his statutory right to a speedy trial was violated. The Appellate Division, by a 4-1 vote, disagreed with defendant and affirmed the judgment, holding there was legally sufficient evidence to support defendant’s health care fraud conviction on the theory that he knowingly and willfully defrauded Medicaid of more than $3,000 by misidentifying the recipient of the drugs he dispensed on February 28, March 6, and April 2, 2008 (82 AD3d 44 [2011]). Applying the legal sufficiency standard, the Appellate Division majority concluded that a rational jury could have found that defendant knew that Ivonne Arroyo was not the recipient of the medications. The majority further stated, “[t]he fact that none of the drugs were *541subjected to laboratory analysis is of no moment with respect to this count. The relevant inquiry is whether defendant provided false information for the purpose of receiving payment ... in excess of $3,000, not the identity of the drugs that were dispensed” (id. at 54-55).
The majority also concluded that the evidence was legally sufficient to establish defendant’s guilt of grand larceny in the third degree. The court found that defendant wrongfully obtained $3,073.47 from New York State “by misleading Medicaid as to the actual recipient of whatever drugs were dispensed” during the three transactions from February 28 to April 2, 2008 (id. at 55). In addition, the majority rejected defendant’s speedy trial claim, finding that the delay during the applicable period was properly excluded from the speedy trial calculation since it was attributable to motion practice.
The dissent argued there was insufficient proof that defendant knowingly and willfully misidentified the drugs dispensed on March 6, 2008 or the recipient of the drugs (for any of the transactions). Thus, according to the dissent, defendant’s grand larceny conviction should be vacated and the health care fraud conviction reduced from fourth degree to fifth degree because, without the $519.04 billing for the March 2008 transaction, the total amount unlawfully obtained from Medicaid would fall below the “exceeds $3,000” threshold for both third-degree grand larceny and fourth-degree health care fraud.
A Judge of this Court granted defendant leave to appeal (16 NY3d 860 [2011]), and we now affirm.
In a legal sufficiency inquiry, this Court’s role is limited to determining whether, “after viewing the evidence in the light most favorable to the prosecution, any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt” (Jackson v Virginia, 443 US 307, 319 [1979]; see also People v Contes, 60 NY2d 620, 621 [1983]). Where the evidence adduced at trial establishes “ ‘any valid line of reasoning and permissible inferences [that] could lead a rational person’ to convict, then the conviction survives a sufficiency review” (People v Santi, 3 NY3d 234, 246 [2004], quoting People v Williams, 84 NY2d 925, 926 [1994]). “A sufficiency inquiry requires a court to marshal competent facts most favorable to the People and determine whether, as a matter of law, a jury could logically conclude that the People sustained its burden of proof’ (People v Danielson, 9 NY3d 342, 349 [2007]).
*542To establish health care fraud in the fourth degree, the People must prove that the defendant,
“with intent to defraud a health care plan . . . knowingly and willfully provide [d] materially false information . . . for the purpose of requesting payment from a health plan for a health care item or service and, as a result of such information . . . , [the defendant] or another person receive [d] payment in an amount [to which the defendant or another was] not entitled,” and “the payment wrongfully received . . . from a single health plan, in a period of not more than one year exceed[ed] [$3,000] in the aggregate” (Penal Law §§ 177.05, 177.10).
Further, grand larceny in the third degree is made out when the People prove that the defendant stole property and that the value of the property exceeds $3,000 (see Penal Law § 155.35).
Here, it is clear that the People presented sufficient evidence for a jury to rationally conclude that the pink and orange pills dispensed to Gomez were different from the drugs listed on the prescriptions presented to defendant on February 28, 2008 and April 2, 2008, and that defendant knowingly and willfully provided materially false information to Medicaid (as to at least the dispensed medications) on those dates. However, defendant, in an attempt to reduce his health care fraud and grand larceny convictions, argues that there is no legally sufficient proof to conclude that on March 6, 2008, he dispensed something other than Sustiva, the medication actually prescribed, or that he dispensed it knowing that Arroyo was not going to be the recipient of the medication. Defendant essentially contends that because the People failed to prove the “knowingly and willfully providing materially false information” element as to the March 2008 transaction, not only must the fourth-degree health care fraud conviction be reduced, but the third-degree grand larceny must be reversed or reduced because the “exceeds $3,000” threshold is not met. We disagree.
As stated, on March 6, 2008, Gomez came into the pharmacy with a prescription for 30 600-milligram tablets of Sustiva, a relatively expensive medication. He asked for “the usual pills” and defendant handed him 40 orange pills stamped “GG 461.” Viewing the evidence—i.e., Gomez’s request for medicine other than Sustiva; the discrepancy between the number of pills in the prescription and the number of pills defendant actually gave Gomez; and the whole course of dealing, in which defendant *543consistently gave Gomez what Gomez asked for, rather than what was prescribed—in the light most favorable to the People, a jury could reasonably infer that the pills were not Sustiva and that Ivonne Arroyo would not be the recipient of the medication, and therefore that defendant knowingly and willfully provided materially false information to Medicaid.
Defendant’s speedy trial argument is also unavailing. During much of the time defendant complains about, motion practice, which is an excuse for not being ready, was going on. In any event, it appears that the most time the People can be charged with is 129 days, well short of six months (see GPL 30.30 [1] [a]).
Accordingly, the order of the Appellate Division should be affirmed.
Chief Judge Lippman and Judges Ciparick, Graffeo, Read, Smith and Pigott concur.
Order affirmed.
In 2006, legislation was enacted to amend the Public Health Law for the purpose of establishing the Office of the Medicaid Inspector General within the Department of Health and providing for its powers and duties (L 2006, ch 442). The overarching goal of the legislation was to improve fraud control and expenditure accountability within the Medicaid program (id.). As part of that legislation, Penal Law article 177 was enacted to create five health care fraud offenses (id. at § 9 [eff Nov. 1, 2006]). These crimes are meant to “get at the specific conduct by health care providers who defraud the system; make it easier to aggregate claims for fraud against a single health plan; and send a clear message to health care providers that the state remains vigilant and will punish fraud against the health care system” (Donnino, Practice Commentary, McKinney’s Cons Laws of NY, Book 39, Penal Law § 177.00, at 481-482).