Subtract 76561197960265728 from the SteamID64 to get the Account ID (N). Then Y is N mod 2 and Z is N divided by 2, rounded down, and the result is STEAM_X:Y:Z. Example: 76561197960287930 minus the base gives N = 22202, so Y = 0, Z = 11101 and the ID is STEAM_0:0:11101.