Perfect Number (2012)
Perfect Number (; lit. Suspect X) is a 2012 South Korean mystery-drama film directed by Bang Eun-jin. Adapted from Keigo Higashino's novel The Devotion of Suspect X, it centers around a mild-mannered mathematics professor (Ryoo Seung-bum) who plans the perfect alibi for the woman he secretly loves (Lee Yo-won) when she unexpectedly murders her abusive ex-husband.
More at Wikipedia.