afedorov:
how can I add input pins to nano? Is there a chip?
Shift register
More digital inputs: 74HC165
Tutorials: http://playground.arduino.cc/Code/ShiftRegSN74HC165N
Digitalduino: Arduino 74HC165 PSIO Shift Regsiter
More digital outputs: 74HC595
Tutorial: https://www.arduino.cc/en/Tutorial/ShiftOut
More analog inputs:
Multiplexer: 74HC4067, 74HC4052
(And of course there are I2c and SPI port expanders, like PCF8574, PCF9555 MCP23009, MCP23017, MCP 23S09, MCP23S17 ...)