local int = require "int" local a = 42 local b = 2017 print(int.modinv(a, b))