# Advent of Code: Day 1

Source

Part 1: Given a string of () characters controlling a simulated elevator, where ( means ‘go up’ and ) means ‘go down’, what floor do you end up on?

data = sys.stdin.read()
print(data.count('(') - data.count(')'))

Basically, count the number of up, subtract the number of down. Nothing much more to say for this one.

Part 2: How far do you make it in the instructions before the current floor is negative?

floor = 0
sys.exit(0)