Be careful of rollover. If your values exceed the total value possible with the integer, it will "roll-over" into negative numbers. You can also get overflow, which causes the integer to restart at zero. You can avoid this by switching to single or double precision for your calculation, although it will slow things down. Drop some To Double Precision Float converters into your diagram to effect this change.